A104246 Minimal number of tetrahedral numbers (A000292(k) = k(k+1)(k+2)/6) needed to sum to n.
1, 2, 3, 1, 2, 3, 4, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 2, 3, 4, 5, 3, 1, 2, 3, 4, 2, 2, 3, 4, 3, 3, 2, 3, 4, 4, 3, 3, 4, 5, 4, 4, 2, 1, 2, 3, 3, 2, 3, 4, 4, 3, 3, 2, 3, 4, 4, 2, 3, 4, 5, 3, 3, 2, 3, 4, 4, 3, 4, 5, 5, 1, 2, 3, 4, 2, 3, 3, 2, 3, 4, 2, 3, 3, 4, 3, 4, 4, 3, 4
Offset: 1
Keywords
References
- Dickson, L. E., History of the Theory of Numbers, Vol. 2: Diophantine Analysis. New York: Dover, 1952, see p. 13.
Links
- Lars Blomberg, Table of n, a(n) for n = 1..10000
- Hyun Kwang Kim, On regular polytope numbers, Proc. Amer. Math. Soc. 131 (2003), pp. 65-75.
- F. Pollock, On the Extension of the Principle of Fermat's Theorem of the Polygonal Numbers to the Higher Orders of Series Whose Ultimate Differences Are Constant. With a New Theorem Proposed, Applicable to All the Orders, Abs. Papers Commun. Roy. Soc. London 5, 922-924, 1843-1850.
- H. E. Salzer and N. Levine, Table of Integers Not Exceeding 1000000 that are Not Expressible as the Sum of Four Tetrahedral Numbers, Math. Comp. 12, 141-144, 1958.
- H. E. Salzer and N. Levine, Proof that every integer <= 452,479,659 is a sum of five numbers of the form Q_x = (x^3+5x)/6, x >= 0, Math. Comp., (1968), 191-192.
- N. J. A. Sloane, Transforms.
- G. L. Watson, Sums of eight values of a cubic polynomial, J. London Math. Soc., 27 (1952), 217-224.
- Eric Weisstein's World of Mathematics, Tetrahedral Number.
Crossrefs
Cf. A000292 (tetrahedral numbers, indices of 1s), A102795 (indices of 2s), A102796 (indices of 3s), A102797 (indices of 4s), A000797 (numbers that need 5 tetrahedral numbers).
See also A102798-A102806, A102855-A102858, A193101, A193105, A281367 (the "triangular nachos" numbers).
Cf. A061336 (analog for triangular numbers).
Programs
-
Maple
tet:=[seq((n^3-n)/6,n=1..20)]; LAGRANGE(tet,8, 120); # the LAGRANGE transform of a sequence is defined in A193101. - N. J. A. Sloane, Jul 15 2011 # alternative N := 10000: L := [seq(0,i=1..N)] : # put 1's where tetrahedral numbers reside for i from 1 to N do Aj := A000292(i) ; if Aj <= N then L := subsop(Aj=1,L) ; end if; end do: for a from 1 do # select positions of a's, skip forward by all available Aj and # if that addresses a not-yet-set position in the array put a+1 there. for i from 1 to N do if op(i,L) =a then for j from 1 do Aj := A000292(j) ; if i+Aj <=N and op(i+Aj,L) = 0 then L := subsop(i+Aj=a+1,L) ; end if; if i +Aj > N then break ; end if; end do: end if; end do: # if all L[] are non-zero, terminate the loop allset := true; for i from 1 to N do if op(i,L) = 0 then allset := false ; break ; end if; end do: if allset then break ; end if; end do: seq( L[i],i=1..N) ; # R. J. Mathar, Jun 06 2025
-
PARI
\\ available on request. - M. F. Hasler, Mar 06 2017
-
PARI
seq(N) = { my(a = vector(N, k, 8), T = k->(k*(k+1)*(k+2))\6); for (n = 1, N, my (k1 = sqrtnint((6*n)\8, 3), k2 = sqrtnint(6*n, 3)); while(n < T(k2), k2--); if (n == T(k2), a[n] = 1; next()); for (k = k1, k2, a[n] = min(a[n], a[n - T(k)] + 1))); a; }; seq(102) \\ Gheorghe Coserea, Mar 14 2017
Extensions
Edited by N. J. A. Sloane, Jul 15 2011
Edited by M. F. Hasler, Mar 06 2017
Comments