OFFSET
1,1
COMMENTS
The sequence is unbounded as a(n+1) is at most the a(n)-th triangular number.
If a(n) + u*(u+1)/2 = t*(t+1)/2 then 2*a(n) = (t-u)*(t+u+1) so t-u and t+u+1 are divisors of 2*a(n) and t-u and t+u+1 have different parity. - David A. Corneth, Jan 06 2026
LINKS
Robert Israel, Table of n, a(n) for n = 1..359
EXAMPLE
45 is a term because 21 + 45 = 66, 45 + 91 = 136, and 66 and 136 are triangular numbers.
MAPLE
R:= 6: r:= 6: s:= 3:
for i from 1 to 30 do
s:= min(select(`>`, map(subs, {isolve(1 + 8*r + 4*y*(y+1) = z^2)}, y), s));
r:= s*(s+1)/2;
R:= R, r
od:
R; # Robert Israel, Jan 05 2026
PROG
(PARI) p=6; k=3; print1(p", "); for(n=1, 30, k=k+1; u=p+k*(k+1)/2; t=sqrtint(2*u); while(u!=t*(t+1)/2, k=k+1; u=p+k*(k+1)/2; t=sqrtint(2*u)); p=k*(k+1)/2; print1(p", "))
(PARI) first(n) = {my(res=List([6])); for(i=2, n-1, listput(res, nxt(res[#res]))); res}
nxt(n) = {my(d = divisors(2*n), u); forstep(i = (#d + 1)\2, 1, -1, if(bitand(d[i]+d[#d + 1 - i], 1), u = (d[#d + 1 - i] - 1 - d[i])/2; c = u*(u+1)/2; if(c > n, return(c))))} \\ David A. Corneth, Jan 06 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 31 2002
EXTENSIONS
More terms from Ralf Stephan, Mar 30 2003
Name clarified by David A. Corneth, Jan 05 2026
STATUS
approved
