[go: up one dir, main page]

login
Revision History for A238018 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Least k such that the sum triangular(k) + triangular(k+1) +...+ triangular(k+n-1) is a triangular number, or -1 if no such k exists.
(history; published version)
#23 by Joerg Arndt at Mon Mar 10 02:25:50 EDT 2014
STATUS

reviewed

approved

#22 by Michel Marcus at Mon Mar 10 02:14:23 EDT 2014
STATUS

proposed

reviewed

#21 by Alex Ratushnyak at Mon Mar 10 01:19:33 EDT 2014
STATUS

editing

proposed

Discussion
Mon Mar 10
02:14
Michel Marcus: I suggest that you write to Jean-Francois.
#20 by Alex Ratushnyak at Mon Mar 10 01:17:07 EDT 2014
COMMENTS

After the missing a(6) the sequence continues: 4, 1, 0, 12, 14.

STATUS

approved

editing

Discussion
Mon Mar 10
01:19
Alex Ratushnyak: If you can run the MATHEMATICA program, please tell the lengths of the longest run of -1's and the longest run of non-negative terms for n<10^6.
#19 by Ralf Stephan at Sun Mar 09 11:44:25 EDT 2014
STATUS

proposed

approved

#18 by Wesley Ivan Hurt at Tue Mar 04 21:37:41 EST 2014
STATUS

editing

proposed

Discussion
Sun Mar 09
11:44
Ralf Stephan: Approved, but only because Jean-Francois found a way to prove nonexistence and wrote a program. Don't depend on it.
#17 by Wesley Ivan Hurt at Tue Mar 04 21:34:26 EST 2014
NAME

Least k such that the sum triangular(k) + triangular(k+1) +...+ triangular(k+n-1) is a triangular number, or -1 if no such k exists.

STATUS

proposed

editing

Discussion
Tue Mar 04
21:37
Wesley Ivan Hurt: Comment could be used as part of the example.  As it is now, I don't know why it is there since this should be clear from the definition.
#16 by Alex Ratushnyak at Sat Mar 01 13:31:04 EST 2014
STATUS

editing

proposed

#15 by Alex Ratushnyak at Sat Mar 01 13:30:52 EST 2014
PROG

(C99)

#include <stdio.h>

#include <math.h>

int main() {

unsigned long long a, s, n, i;

for (n=1; n < 100; ++n) {

for (a=i=0; i<n; ++i)

a += i*(i+1)/2;

s = sqrt(a*2);

if (s*(s+1) == a*2) { printf("%llu, ", i-n); continue; }

for (i = n; ; ++i) {

a -= (i-n)*(i-n+1)/2;

a += i*(i+1)/2;

if (a>=(1ULL<<63)) { printf("-, "); break; }

s = sqrt(a*2);

if (s*(s+1) == a*2) { printf("%llu, ", i-n); break; }

}

}

return 0;

}

#14 by Joerg Arndt at Thu Feb 27 02:13:56 EST 2014
STATUS

proposed

editing