%I #20 Dec 21 2018 08:34:57
%S 0,1,4,5,10,14,15,20,30,34,35,55,56,65,69,70,84,91,111,120,121,125,
%T 126,140,165,175,195,204,205,209,210,220,260,285,286,295,315,325,329,
%U 330,364,369,385,425,455,460,480,490,494,495,505,506,560,589,645,650,671,680,700
%N Numbers that are sums of consecutive tetrahedral numbers.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TetrahedralNumber.html">Tetrahedral Number</a>
%t tet[n_] := n (n + 1) (n + 2)/6; nMax = 700; t = {0}; Do[k = n; s = 0; While[s = s + tet[k]; s <= nMax, AppendTo[t, s]; k++], {n, (6*nMax)^(1/3) + 1}]; t = Union[t] (* _Amiram Eldar_, Dec 09 2018 after _T. D. Noe_ at A034705 *)
%t anmax = 1000; nmax = Floor[(6*anmax)^(1/3)] + 1; Select[Union[Flatten[Table[Sum[k*(k + 1)*(k + 2)/6, {k, i, j}], {i, 0, nmax}, {j, i, nmax}]]], # <= anmax &] (* _Vaclav Kotesovec_, Dec 21 2018 *)
%Y Cf. A000292 (tetrahedral numbers).
%Y Other sums of consecutive numbers: A034705 (squares), A034706 (triangular numbers), A322479 (square pyramidal numbers), A322610 (centered triangular numbers), A322611 (centered square numbers).
%K nonn
%O 1,3
%A _Ilya Gutkovskiy_, Dec 09 2018
|