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.

Showing 1-3 of 3 results.

A061336 Smallest number of triangular numbers which sum to n.

Original entry on oeis.org

0, 1, 2, 1, 2, 3, 1, 2, 3, 2, 1, 2, 2, 2, 3, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 2, 3, 2, 1, 2, 2, 2, 3, 3, 2, 3, 1, 2, 2, 2, 3, 3, 2, 2, 3, 1, 2, 3, 2, 2, 3, 2, 3, 3, 3, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 1, 2, 3, 2, 2, 3, 2, 2, 3, 3, 2, 3, 1, 2, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 2, 1, 2, 2, 2, 3, 3, 2, 3, 2, 2, 2, 2, 3, 3
Offset: 0

Views

Author

Henry Bottomley, Apr 25 2001

Keywords

Comments

a(n)=3 if n=5 or 8 mod 9, since triangular numbers are {0,1,3,6} mod 9.
From Bernard Schott, Jul 16 2022: (Start)
In September 1636, Fermat, in a letter to Mersenne, made the statement that every number is a sum of at most three triangular numbers. This was proved by Gauss, who noted this event in his diary on July 10 1796 with the notation:
EYPHKA! num = DELTA + DELTA + DELTA (where Y is in fact the Greek letter Upsilon and DELTA is the Greek letter of that name).
This proof was published in his book Disquisitiones Arithmeticae, Leipzig, 1801. (End)

Examples

			a(3)=1 since 3=3, a(4)=2 since 4=1+3, a(5)=3 since 5=1+1+3, with 1 and 3 being triangular.
		

References

  • Elena Deza and Michel Marie Deza, Fermat's polygonal number theorem, Figurate numbers, World Scientific Publishing (2012), Chapter 5, pp. 313-377.
  • C. F. Gauss, Disquisitiones Arithmeticae, Yale University Press, 1966, New Haven and London, p. 342, art. 293.

Crossrefs

Cf. A100878 (analog for A000326), A104246 (analog for A000292), A283365 (analog for A000332), A283370 (analog for A000389).

Programs

  • Mathematica
    t[n_]:=n*(n+1)/2; a[0]=0; a[n_]:=Block[ {k=1, tt= t/@ Range[Sqrt[2*n]]}, Off[IntegerPartitions::take]; While[{} == IntegerPartitions[n, {k}, tt, 1], k++]; k]; a/@ Range[0, 104] (* Giovanni Resta, Jun 09 2015 *)
  • PARI
    \\ see A283370 for generic code, working but not optimized for this case of triangular numbers. - M. F. Hasler, Mar 06 2017
    
  • PARI
    a(n)=my(m=n%9,f); if(m==5 || m==8, return(3)); f=factor(4*n+1); for(i=1,#f~, if(f[i,2]%2 && f[i,1]%4==3, return(3))); if(ispolygonal(n,3), n>0, 2) \\ Charles R Greathouse IV, Mar 17 2022

Formula

a(n) = 0 if n=0, otherwise 1 if n is in A000217, otherwise 2 if n is in A051533, otherwise 3 in which case n is in A020757.
a(n) <= 3 (proposed by Fermat and proved by Gauss). - Bernard Schott, Jul 16 2022

A283370 Minimal number of terms required to write n as sum of numbers in A000389 = { C(k,5); k=1,2,3,... } (with repetitions allowed).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6
Offset: 0

Views

Author

M. F. Hasler, Mar 06 2017

Keywords

Comments

Analog, for A000389 = {C(n,5)}, of A061336 (for triangular numbers A000217 = {C(n,2)}), A104246 (for tetrahedral numbers A000292 = {C(n,3)}) and A283365 (for A000332 = {C(n,4)}).

Crossrefs

Cf. A000332 = {C(n,4)}; A061336 (analog for A000217), A104246 (analog for A000292), A283365 (analog for A000332).

Programs

  • PARI
    {a(n,k=5,M=9e9,N=n) = n>k || return(n); for(m=k,M,binomial(m,k)>n && (M=m) && break); M-- <= k && return(n); my(b=binomial(M,k),c=binomial(M-1,k),NN); forstep( nn=n\b,0,-1, if(N>NN=nn+a(n-nn*b,k,M,N),N=NN); n-(nn-1)*b >= (N-nn+1)*c && break); N}

Formula

a(n) <= 10 = a(220) for all n, according to Kim (2003, p. 74, first row of table "d = 5"), but this "numerical result" has no "* denoting exact values" (see Remark at end of paper), so it could be incorrect. [Disclaimer added by M. F. Hasler, Sep 22 2022]

A356037 Conjecturally, a(n) is the smallest number m such that every natural number is a sum of at most m n-simplex numbers.

Original entry on oeis.org

1, 3, 5, 8, 10, 13, 15, 15, 19, 24
Offset: 1

Views

Author

Mohammed Yaseen, Jul 24 2022

Keywords

Comments

n-simplex numbers are {binomial(k,n); k>=n}.
This problem is the simplex number analog of Waring's problem.
a(2) = 3 was proposed by Fermat and proved by Gauss, see A061336.
Pollock conjectures that a(3) = 5. Salzer and Levine prove this for numbers up to 452479659. See A104246 and A000797.
Kim gives a(4)=8, a(5)=10, a(6)=13 and a(7)=15 (not proved).

Examples

			2-simplex numbers are {binomial(k,2); k>=2} = {1,3,6,10,...}, the triangular numbers. 3 is the smallest number m such that every natural number is a sum of at most m triangular numbers. So a(2)=3.
3-simplex numbers are {binomial(k,3); k>=3} = {1,4,10,20,...}, the tetrahedral numbers. 5 is presumed to be the smallest number m such that every natural number is a sum of at most m tetrahedral numbers. So a(3)=5.
		

Crossrefs

Minimal number of x-simplex numbers whose sum equals n: A061336 (x=2), A104246 (x=3), A283365 (x=4), A283370 (x=5).
x-simplex numbers: A000217 (x=2), A000292 (x=3), A000332 (x=4), A000389 (x=5), A000579 (x=6), A000580 (x=7), A000581 (x=8), A000582 (x=9).
Showing 1-3 of 3 results.