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-8 of 8 results.

A104246 Minimal number of tetrahedral numbers (A000292(k) = k(k+1)(k+2)/6) needed to sum to n.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Feb 26 2005

Keywords

Comments

According to Dickson, Pollock conjectures that a(n) <= 5 for all n. Watson shows that a(n) <= 8 for all n, and Salzer and Levine show that a(n) <= 5 for n <= 452479659. - N. J. A. Sloane, Jul 15 2011
Possible correction of the first comment by Sloane 2011: it appears to me from the linked reference by Salzer and Levine 1968 that 452479659 is instead the upper limit for sums of five Qx = Tx + x, where Tx are the tetrahedral numbers we want. They also mention an upper limit for sums of five Tx, which is: a(n) <= 5 for n <= 276976383. - Ewoud Dronkert, May 30 2024
If we use the greedy algorithm for this, we get A281367. - N. J. A. Sloane, Jan 30 2017
Could be extended with a(0) = 0, in analogy to A061336. Kim (2003, first row of table "d = 3" on p. 73) gives max {a(n)} = 5 as a "numerical result", but the value has no "* denoting exact values" (see Remark at end of paper), which means this could be incorrect. - M. F. Hasler, Mar 06 2017, edited Sep 22 2022

References

  • Dickson, L. E., History of the Theory of Numbers, Vol. 2: Diophantine Analysis. New York: Dover, 1952, see p. 13.

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

A306460 Number of ways to write n as x*(2x-1) + y*(y+1)/2 + z*(z+1)*(z+2)/6, where x,y,z are nonnegative integers with x > 0.

Original entry on oeis.org

1, 2, 1, 1, 2, 2, 3, 3, 1, 2, 4, 3, 2, 1, 2, 6, 5, 1, 3, 3, 4, 6, 1, 1, 4, 6, 3, 3, 5, 3, 6, 4, 2, 3, 5, 5, 4, 6, 4, 2, 5, 5, 3, 5, 2, 6, 7, 3, 5, 5, 7, 5, 4, 2, 5, 8, 5, 3, 2, 6, 6, 4, 5, 5, 6, 7, 5, 5, 4, 6, 9, 6, 6, 5, 1, 7, 8, 3, 2, 6, 7, 5, 6, 5, 7, 8, 5, 3, 2, 6, 10, 6, 8, 7, 7, 5, 4, 6, 5, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 17 2019

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 0. In other words, any positive integer n can be written as the sum of a positive hexagonal number, a triangular number and a tetrahedral number.
We have verified a(n) > 0 for all n = 1..10^7.
Conjecture 2: Let c be 1 or 3. Then each n = 0,1,... can be written as c*x(x+1) + y*(y+1)/2 + z*(z+1)*(z+2)/6 with x,y,z nonnegative integers.
Conjecture 3: Let t(x) = x*(x+1)*(x+2)/6. Then each n = 0,1,... can be written as 2*t(w) + t(x) + t(y) + t(z) with w,x,y,z nonnegative integers.
We have verified Conjecture 3 for all n = 0..2*10^5. Clearly, Conjecture 3 implies Pollock's conjecture which states that any natural number is the sum of five tetrahedral numbers.

Examples

			a(3) = 1 with 3 = 1*(2*1-1) + 1*2/2 + 1*2*3/6.
a(14) = 1 with 14 = 1*(2*1-1) + 2*3/2 + 3*4*5/6.
a(75) = 1 with 75 = 5*(2*5-1) + 4*5/2 + 4*5*6/2.
a(349) = 1 with 349 = 5*(2*5-1) + 24*25/2 + 2*3*4/6.
a(369) = 1 with 369 = 4*(2*4-1) + 10*11/2 + 11*12*13/6.
a(495) = 1 with 495 = 8*(2*8-1) + 20*21/2 + 9*10*11/6.
a(642) = 1 with 642 = 16*(2*16-1) + 16*17/2 + 3*4*5/6.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=n(n+1)(n+2)/6;
    TQ[n_]:=TQ[n]=IntegerQ[Sqrt[8n+1]];
    tab={};Do[r=0;Do[If[f[z]>=n, Goto[aa]]; Do[If[TQ[n-f[z]-x(2x-1)],r=r+1],{x,1,(Sqrt[8(n-f[z])+1]+1)/4}];Label[aa],{z,0,n}];tab=Append[tab,r],{n,1,100}];Print[tab]

A282172 Expansion of (Sum_{k>=0} x^(k*(k+1)*(k+2)/6))^5.

Original entry on oeis.org

1, 5, 10, 10, 10, 21, 30, 20, 15, 30, 35, 30, 40, 40, 35, 60, 65, 25, 30, 60, 46, 50, 80, 50, 55, 120, 95, 20, 60, 90, 60, 80, 100, 40, 80, 145, 85, 30, 90, 85, 105, 155, 100, 40, 155, 170, 90, 80, 100, 90, 171, 145, 40, 60, 140, 110, 125, 130, 80, 140, 250, 170, 70, 110, 140, 160, 190, 140, 90, 180, 220, 170, 95, 70, 110, 215
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 07 2017

Keywords

Comments

Number of ways to write n as an ordered sum of 5 tetrahedral (or triangular pyramidal) numbers (A000292).
a(n) > 0 for all n ("Pollock's Conjecture").

Examples

			a(4) = 10 because we have:
[4, 0, 0, 0, 0]
[0, 4, 0, 0, 0]
[0, 0, 4, 0, 0]
[0, 0, 0, 4, 0]
[0, 0, 0, 0, 4]
[1, 1, 1, 1, 0]
[1, 1, 1, 0, 1]
[1, 1, 0, 1, 1]
[1, 0, 1, 1, 1]
[0, 1, 1, 1, 1]
		

Crossrefs

Programs

  • Mathematica
    nmax = 75; CoefficientList[Series[(Sum[x^(k (k + 1) (k + 2)/6), {k, 0, nmax}])^5, {x, 0, nmax}], x]

Formula

G.f.: (Sum_{k>=0} x^(k*(k+1)*(k+2)/6))^5.

A306462 Number of ways to write n as C(2w,2) + C(x+2,3) + C(y+3,4) + C(z+4,5), where C(n,k) denotes the binomial coefficient n!/(k!*(n-k)!), w is a positive integer and x,y,z are nonnegative integers.

Original entry on oeis.org

1, 3, 3, 1, 1, 4, 7, 6, 2, 2, 6, 8, 5, 1, 2, 9, 11, 5, 1, 4, 9, 12, 7, 2, 4, 10, 12, 7, 4, 6, 10, 11, 6, 5, 5, 10, 15, 8, 4, 7, 11, 14, 9, 4, 5, 11, 14, 6, 6, 10, 15, 12, 5, 7, 8, 11, 14, 7, 5, 6, 11, 14, 12, 11, 6, 11, 15, 12, 7, 9, 18, 21, 12, 5, 5, 15, 19, 11, 3, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 17 2019

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 4, 5, 14, 19.
We have verified a(n) > 0 for all n = 1..5*10^6.
See also A306471 and A306477 for similar conjectures.

Examples

			a(1) = 1 with 1 = C(2,2) + C(2,3) + C(3,4) + C(4,5).
a(4) = 1 with 4 = C(2,2) + C(3,3) + C(4,4) + C(5,5).
a(5) = 1 with 5 = C(2,2) + C(4,3) + C(3,4) + C(4,5).
a(14) = 1 with 14 = C(4,2) + C(3,3) + C(4,4) + C(6,5).
a(19) = 1 with 19 = C(6,2) + C(4,3) + C(3,4) + C(4,5).
		

Crossrefs

Programs

  • Mathematica
    f[m_,n_]:=f[m,n]=Binomial[m+n-1,m];
    HQ[n_]:=HQ[n]=IntegerQ[Sqrt[8n+1]]&&Mod[Sqrt[8n+1],4]==3;
    tab={};Do[r=0;Do[If[f[5,z]>=n,Goto[cc]];Do[If[f[4,y]>=n-f[5,z],Goto[bb]];Do[If[f[3,x]>=n-f[5,z]-f[4,y],Goto[aa]];If[HQ[n-f[5,z]-f[4,y]-f[3,x]],r=r+1],{x,0,n-1-f[5,z]-f[4,y]}];Label[aa],{y,0,n-1-f[5,z]}];Label[bb],{z,0,n-1}];Label[cc];tab=Append[tab,r],{n,1,80}];Print[tab]

A306471 Number of ways to write n as C(2w+1,2) + C(x+2,3) + C(y+3,4) + C(z+4,5) with w,x,y,z nonnegative integers, where C(n,k) denotes the binomial coefficient n!/(k!*(n-k)!).

Original entry on oeis.org

1, 3, 3, 2, 4, 6, 5, 4, 4, 5, 7, 8, 6, 4, 5, 8, 8, 5, 4, 6, 7, 10, 10, 6, 6, 12, 13, 8, 7, 7, 6, 11, 9, 4, 3, 8, 16, 12, 8, 9, 9, 13, 14, 10, 7, 9, 18, 12, 6, 5, 4, 11, 10, 4, 2, 5, 19, 21, 11, 9, 13, 20, 16, 9, 6, 8, 17, 17, 4, 2, 9, 20, 17, 6, 9, 9, 15, 23, 14, 9, 15
Offset: 0

Views

Author

Zhi-Wei Sun, Feb 17 2019

Keywords

Comments

Conjecture 1: a(n) > 1 for all n > 0.
We have verified a(n) > 0 for all n = 0..5*10^6.
Conjecture 2: For each r = 0, 1, any positive integer can be written as w^2 + C(x,3) + C(y,4) + C(z,5), where w,x,y,z are nonnegative integers with w - r even.
See also A306462 and A306477 for similar conjectures.

Examples

			a(0) = 1 with 0 = C(1,2) + C(2,3) + C(3,4) + C(4,5).
a(3) = 2 with 3 = C(3,2) + C(2,3) + C(3,4) + C(4,5) = C(1,2) + C(3,3) + C(4,4) + C(5,5).
a(54) = 2 with 54 = C(3,2) + C(7,3) + C(6,4) + C(5,5) = C(3,2) + C(5,3) + C(7,4) + C(6,5).
a(69) = 1 with 69 = C(3,2) + C(5,3) + C(7,4) + C(7,5) = C(3,2) + C(5,3) + C(3,4) + C(8,5).
		

Crossrefs

Programs

  • Mathematica
    f[m_,n_]:=f[m,n]=Binomial[m+n-1,m];
    HQ[n_]:=HQ[n]=IntegerQ[Sqrt[8n+1]]&&Mod[Sqrt[8n+1],4]==1;
    tab={};Do[r=0;Do[If[f[5,z]>n,Goto[cc]];Do[If[f[4,y]>n-f[5,z],Goto[bb]];Do[If[f[3,x]>n-f[5,z]-f[4,y],Goto[aa]];If[HQ[n-f[5,z]-f[4,y]-f[3,x]],r=r+1],{x,0,n-f[5,z]-f[4,y]}];Label[aa],{y,0,n-f[5,z]}];Label[bb],{z,0,n}];Label[cc];tab=Append[tab,r],{n,0,80}];Print[tab]

A306459 Number of ways to write n as w^3 + C(x+2,3) + C(y+2,3) + C(z+2,3), where w,x,y,z are nonnegative integers with x <= y <= z, and C(m,k) denotes the binomial coefficient m!/(k!*(m-k)!).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 20 2019

Keywords

Comments

Conjecture: a(n) > 0 for all n >= 0. In other words, each nonnegative integer can be written as the sum of a nonnegative cube and three tetrahedral numbers.
It seems that a(n) = 1 only for n = 0, 7, 17, 27, 34, 53, 54, 110, 118, 163, 207, 263, 270, 309, 362, 443, 1174, 1284.
We have verified a(n) > 0 for all n = 0..2*10^6.

Examples

			a(0) = 1 with 0 = 0^3 + C(2,3) + C(2,3) + C(2,3).
a(17) = 1 with 17 = 2^3 + C(3,3) + C(4,3) + C(4,3).
a(27) = 1 with 27 = 3^3 + C(2,3) + C(2,3) + C(2,3).
a(362) = 1 with 362 = 0^3 + C(6,3) + C(8,3) + C(13,3).
a(443) = 1 with 443 = 3^3 + C(5,3) + C(10,3) + C(13,3).
a(1174) = 1 with 1174 = 1^3 + C(9,3) + C(10,3) + C(19,3).
a(1284) = 1 with 1284 = 10^3 + C(7,3) + C(9,3) + C(11,3).
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=Binomial[n+2,3];
    CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)];
    tab={};Do[r=0;Do[If[f[x]>n/3,Goto[cc]];Do[If[f[y]>(n-f[x])/2,Goto[bb]];Do[If[f[z]>n-f[x]-f[y],Goto[aa]];If[CQ[n-f[x]-f[y]-f[z]],r=r+1],{z,y,n-f[x]-f[y]}];Label[aa],{y,x,(n-f[x])/2}];Label[bb],{x,0,n/3}];Label[cc];tab=Append[tab,r],{n,0,100}];Print[tab]

A102800 Let f(n) = A104246(n) be the minimal number of nonzero tetrahedral numbers that add to n; sequence gives numbers n for which f(n) <= 4.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74
Offset: 1

Views

Author

Jud McCranie, Feb 26 2005

Keywords

Crossrefs

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-8 of 8 results.