cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A129965 Triangular numbers that are the difference of nonnegative cubes.

This page as a plain text file.
%I A129965 #11 Dec 05 2023 20:45:10
%S A129965 0,1,91,4095,5886,7875,8128,8911,9045,17955,21736,23653,47278,93961,
%T A129965 115921,130816,184528,259560,379756,488566,575128,658378,758296,
%U A129965 810901,873181,885115,1060696,1155960,1358776,1385280,1997001,2616328,2685403
%N A129965 Triangular numbers that are the difference of nonnegative cubes.
%H A129965 Robert Israel, <a href="/A129965/b129965.txt">Table of n, a(n) for n = 1..439</a> (terms <= 10^12)
%e A129965 A000217(13) = Sum_{k=1..13} k = 91 = 216 - 125 = 6^3 - 5^3, so 91 is in the sequence. - _Peter Munn_, Dec 05 2022
%p A129965 M:= 10^7: # for terms <= M
%p A129965 S:= {0}:
%p A129965 for x from 1 while 3*x^2 - 3*x + 1 < M do
%p A129965    if x^3 < M then Y:= 0 else Y:= ceil(x^3-M) fi;
%p A129965   S:= S union select(t -> issqr(1+8*t),{seq(x^3 - y^3, y = Y .. x-1)});
%p A129965 od:
%p A129965 sort(convert(S,list)); # _Robert Israel_, Dec 05 2023
%t A129965 With[{n = 5000}, Intersection[(#1*((#1 + 1)/2) & ) /@ Range[0, n], Flatten[Outer[ #1^3 - #2^3 &, Range[n], Range[0, n - 1]]]]]
%Y A129965 Intersection of A000217 and A152043.
%Y A129965 Cf. A038596, A129966, A185253.
%K A129965 nonn
%O A129965 1,3
%A A129965 Peter Pein (petsie(AT)dordos.net), Jun 13 2007, Jun 14 2007