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.

A255934 Number of ways to write n as the sum of four unordered generalized octagonal numbers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 11 2015

Keywords

Comments

I have proved that a(n) > 0 for all n, i.e., any nonnegative integer can be expressed as the sum of four generalized octagonal numbers. I can show that a(n) = 1 if 3*n+4 is among 7, 13, 19, 31, 43, 2^(2k), 5*2^(2k+1), 11*2^(2k+1), 23*2^(2k+1) (k = 0,1,2,...), and conjecture the converse.
I also conjecture that each nonnegative integer can be written as the sum of two heptagonal numbers, a second heptagonal number and a generalized heptagonal number.

Examples

			a(60) = 1 since 60 = 1*(3*1-2) + (-1)*(3*(-1)-2) + 3*(3*3-2) + (-3)*(3*(-3)-2).
a(1876) = 1 since 1876 = (-5)*(3*(-5)-2) + (-5)*(3*(-5)-2) + 11*(3*11-2) + (-21)*(3*(-21)-2).
a(15700) = 1 since 15700 = 11*(3*11-2) + (-21)*(3*(-21)-2) + 43*(3*43-2) + (-53)*(3*(-53)-2).
a(21844) = 1 since 21844 = 43*(3*43-2) + 43*(3*43-2) + 43*(3*43-2) + 43*(3*43-2).
a(30036) = 1 since 30036 = (-21)*(3*(-21)-2) + (-21)*(3*(-21)-2) + 43*(3*43-2) + (-85)*(3*(-85)-2).
		

Crossrefs

Programs

  • Mathematica
    T[n_]:=Union[Table[x(3x-2),{x,-Floor[(Sqrt[3n+1]-1)/3],Floor[(Sqrt[3n+1]+1)/3]}]]
    Do[r=0;Do[If[n-Part[T[n],x]-Part[T[n],y]-Part[T[n],z]
    				

A306242 Number of ways to write n as x*(3x+1) + y*(3y-1) + z*(3z+2) + w*(3w-2), where x,y,z,w are nonnegative integers.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 3, 2, 2, 1, 3, 4, 3, 3, 2, 4, 3, 3, 4, 3, 4, 3, 3, 4, 3, 4, 7, 4, 5, 4, 3, 4, 4, 6, 6, 3, 9, 6, 2, 5, 5, 8, 4, 6, 7, 6, 5, 6, 3, 5, 9, 6, 8, 7, 8, 7, 7, 8, 7, 4, 9, 8, 6, 6, 7, 7, 13, 9, 6, 6, 7, 11, 4, 6, 11, 9, 12
Offset: 0

Views

Author

Zhi-Wei Sun, Jan 31 2019

Keywords

Comments

Conjecture: a(n) > 0 for all n >= 0, and a(n) = 1 only for n = 0, 1, 2, 3, 4, 9, 13. Moreover, any nonnegative integer n can be written as x*(3x+1) + y*(3y-1) + z*(3z+2) + w*(3w-2), where x,y,z,w are nonnegative integers with x or y even.
The conjecture has been verified for n up to 10^6.
By Theorem 1.3 of the linked 2017 paper of the author, each nonnegative integer can be written as x*(3x+1) + y*(3y-1) + z*(3z+2) + 0*(3*0-2) with x,y,z integers.
We also have some other similar conjectures. For example, we conjecture that every n = 0,1,2,... can be written as x*(5x+1)/2 + y*(5y-1)/2 + z*(5z+3)/2 + w*(5w-3)/2 with x,y,z,w nonnegative integers.

Examples

			a(1) = 1 with 1 = 0*(3*0+1) + 0*(3*0-1) + 0*(3*0+2) + 1*(3*1-2).
a(3) = 1 with 3 = 0*(3*0+1) + 1*(3*1-1) + 0*(3*0+2) + 1*(3*1-2).
a(4) = 1 with 4 = 1*(3*1+1) + 0*(3*0-1) + 0*(3*0+2) + 0*(3*0-2).
a(9) = 1 with 9 = 1*(3*1+1) + 0*(3*0-1) + 1*(3*1+2) + 0*(3*0-2).
a(13) = 1 with 13 = 0*(3*0+1) + 0*(3*0-1) + 1*(3*1+2) + 2*(3*2-2).
		

Crossrefs

Programs

  • Mathematica
    OctQ[n_]:=OctQ[n]=IntegerQ[Sqrt[3n+1]]&&(n==0||Mod[Sqrt[3n+1]+1,3]==0);
    tab={};Do[r=0;Do[If[OctQ[n-x(3x+2)-y(3y+1)-z(3z-1)],r=r+1],{x,0,(Sqrt[3n+1]-1)/3},{y,0,(Sqrt[12(n-x(3x+2))+1]-1)/6},{z,0,(Sqrt[12(n-x(3x+2)-y(3y+1))+1]+1)/6}];tab=Append[tab,r],{n,0,80}];Print[tab]

A256106 Number of ways to write n as w + x + 2*y + 4*z, where w,x,y,z are hexagonal numbers with w <= x.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 14 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n.
(ii) Any nonnegative integer n can be written as w + b*x + c*y + d*z with w,x,y,z pentagonal numbers, provided that (b,c,d) is one of the following 15 triples: (1,1,2), (1,2,2), (1,2,3), (1,2,4), (1,2,5), (1,2,6), (1,3,6), (2,2,4), (2,2,6), (2,3,4), (2,3,5), (2,3,7), (2,4,6), (2,4,7), (2,4,8).
I have shown the following related result: For m > 4 and 0 < a <= b <= c <= d, if every nonnegative integer can be written as a*w + b*x + c*y + d*z with w,x,y,z m-gonal numbers, then either m = 6 and (a,b,c,d) = (1,1,2,4), or m = 5 and a = 1 and (b,c,d) is among the 15 triples listed in part (ii) of the conjecture.
In the preprint arXiv:1608.02022, Xiang-Zi Meng and Zhi-Wei Sun confirmed part (i) of the conjecture, and they also proved that for each triple (b,c,d) = (1,2,2),(1,2,4) any natural number can be written as w + b*x + c*y + d*z with w,x,y,z pentagonal numbers. Zhi-Wei Sun, Aug 09 2016

Examples

			a(65) = 1 since 65 = 1*(2*1-1) + 4*(2*4-1) + 2*2*(2*2-1) + 4*2*(2*2-1) = 1 + 28 + 2*6 + 4*6 with 1,28,6,6 hexagonal numbers.
a(104) = 1 since 104 = 1*(2*1-1) + 7*(2*7-1) + 2*2*(2*2-1) + 4*0*(2*0-1) = 1 + 91 + 2*6 + 4*0 with 1,91,6,0 hexagonal numbers.
		

Crossrefs

Programs

  • Mathematica
    H[n_]:=IntegerQ[Sqrt[8n+1]]&&(n==0||Mod[Sqrt[8n+1]+1,4]==0)
    Do[r=0;Do[If[Mod[n-x(2x-1)-y(2y-1)-2z(2z-1),4]==0&&H[(n-x(2x-1)-y(2y-1)-2z(2z-1))/4],r=r+1],{x,0,(Sqrt[4n+1]+1)/4},{y,x,(Sqrt[8(n-x(2x-1))+1]+1)/4},
    {z,0,(Sqrt[4(n-x(2x-1)-y(2y-1))+1]+1)/4}];Print[n," ",r];Continue,{n,0,100}]

A256132 Number of ways to write n as w*(3w+1)/2 + x*(3x-1)/2 + y*(3y-1)/2 + z*(3z-1)/2, where w,x,y,z are nonnegative integers with x <= y <= z.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 15 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n. In other words, any nonnegative integer n can be expressed as the sum of three pentagonal numbers and a second pentagonal number.
See also A255350 for a similar conjecture.

Examples

			 a(4) = 1 since 4 = 1*(3*1+1)/2 + 0*(3*0-1)/2 + 1*(3*1-1)/2 + 1*(3*1-1)/2.
a(11) = 1 since 11 = 0*(3*0+1)/2 + 1*(3*1-1)/2 + 2*(3*2-1)/2 + 2*(3*2-1)/2.
a(23) = 1 since 23 = 0*(3*0+1)/2 + 0*(3*0-1)/2 + 1*(3*1-1)/2 + 4*(3*4-1)/2.
		

Crossrefs

Programs

  • Mathematica
    GenPen[n_]:=IntegerQ[Sqrt[24n+1]]&&Mod[Sqrt[24n+1],6]==1
    Do[r=0;Do[If[GenPen[n-x(3x-1)/2-y(3y-1)/2-z(3z-1)/2],r=r+1],{x,0,(Sqrt[8n+1]+1)/6},{y,x,(Sqrt[12(n-x(3x-1)/2)+1]+1)/6},
    {z,y,(Sqrt[24(n-x(3x-1)/2-y(3y-1)/2)+1]+1)/6}];Print[n," ",r];Continue,{n,0,100}]

A306249 Number of ways to write n as x*(2x-1) + y*(3y-1) + z*(4z-1) + w*(5w-1), where x,y,z are nonnegative integers and w is 0 or 1.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 31 2019

Keywords

Comments

Conjecture: a(n) > 0 for any nonnegative integer n.
This has been verified for n up to 10^6. By Theorem 1.2 of the linked 2017 paper of the author, any nonnegative integer can be written as x*(2x-1) + y*(3y-1) + z*(4z-1) with x,y,z integers.
We have some other similar conjectures. For example, we conjecture that each n = 0,1,2,... can be written as x*(3x-1)/2 + y*(5y-1)/2 + z*(7z-1)/2 + w*(9w-1)/2) (or x*(x-1) + y*(2y-1) + z*(3z-1) + w*(4w-1)) with x,y,z,w nonnegative integers.

Examples

			a(1) = 1 with 1 = 1*(2*1-1) + 0*(3*0-1) + 0*(4*0-1) + 0*(5*0-1).
a(2) = 1 with 2 = 0*(2*0-1) + 1*(3*1-1) + 0*(4*0-1) + 0*(5*0-1).
a(12) = 1 with 12 = 2*(2*2-1) + 1*(3*1-1) + 0*(4*0-1) + 1*(5*1-1).
a(26) = 1 with 26 = 2*(2*2-1) + 1*(3*1-1) + 2*(4*2-1) + 1*(5*1-1).
a(220) = 1 with 220 = 6*(2*6-1) + 7*(3*7-1) + 2*(4*2-1) + 0*(5*0-1).
a(561) = 1 with 561 = 17*(2*17-1) + 0*(3*0-1) + 0*(4*0-1) + 0*(5*0-1).
a(1356) = 1 with 1356 = 23*(2*23-1) + 1*(3*1-1) + 9*(4*9-1) + 1*(5*1-1).
		

Crossrefs

Programs

  • Mathematica
    HexQ[n_]:=HexQ[n]=IntegerQ[Sqrt[8n+1]]&&(n==0||Mod[Sqrt[8n+1]+1,4]==0);
    tab={};Do[r=0;Do[If[HexQ[n-x(5x-1)-y(4y-1)-z(3z-1)],r=r+1],{x,0,Min[1,(Sqrt[20n+1]+1)/10]},{y,0,(Sqrt[16(n-x(5x-1))+1]+1)/8},{z,0,(Sqrt[12(n-x(5x-1)-y(4y-1))+1]+1)/6}];tab=Append[tab,r],{n,0,100}];Print[tab]

A306250 Number of ways to write n as x*(3x+1) + y*(3y-1) + z*(3z+2) + w*(3w-2), where x,y,z,w are nonnegative integers with x*y*z = 0.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 01 2019

Keywords

Comments

Conjecture: a(n) > 0 for any nonnegative integer n.
Clearly, a(n) <= A306242(n). We have verified a(n) > 0 for all n = 0..10^6.

Examples

			a(12) = 1 with 12 = 1*(3*1+1) + 0*(3*0-1) + 0*(3*0+2) + 2*(3*2-2).
a(42) = 1 with 42 = 0*(3*0+1) + 1*(3*1-1) + 0*(3*0+2) + 4*(3*4-2).
a(62) = 3 with 62 = 3*(3*3+1) + 3*(3*3-1) + 0*(3*0+2) + 2*(3*2-2)
= 4*(3*4+1) + 2*(3*2-1) + 0*(3*0+2) + 0*(3*0-2) = 4*(3*4+1) + 1*(3*1-1) + 0*(3*0+2) + 2*(3*2-2).
a(99) = 1 with 99 = 2*(3*2+1) + 0*(3*0-1) + 5*(3*5+2) + 0*(3*0-2).
a(118) = 1 with 118 = 0*(3*0+1) + 6*(3*6-1) + 2*(3*2+2) + 0*(3*0-2).
		

Crossrefs

Programs

  • Mathematica
    OctQ[n_]:=OctQ[n]=IntegerQ[Sqrt[3n+1]]&&(n==0||Mod[Sqrt[3n+1]+1,3]==0);
    tab={};Do[r=0;Do[If[OctQ[n-x(3x+2)-y(3y+1)-z(3z-1)],r=r+1],{x,0,(Sqrt[3n+1]-1)/3},{y,0,(Sqrt[12(n-x(3x+2))+1]-1)/6},{z,0,If[x>0&&y>0,0,(Sqrt[12(n-x(3x+2)-y(3y+1))+1]+1)/6]}];tab=Append[tab,r],{n,0,100}];Print[tab]

A290943 Number of ways to write n as an ordered sum of 3 generalized pentagonal numbers (A001318).

Original entry on oeis.org

1, 3, 6, 7, 6, 6, 7, 12, 12, 12, 9, 6, 12, 12, 18, 13, 12, 18, 12, 18, 12, 13, 18, 12, 24, 12, 12, 24, 21, 30, 12, 18, 18, 12, 24, 18, 19, 18, 24, 24, 18, 24, 36, 24, 18, 19, 18, 24, 24, 30, 18, 12, 36, 30, 24, 21, 18, 36, 24, 36, 24, 12, 36, 36, 36, 18, 25, 30, 24, 24, 24, 30, 24, 36, 30, 24
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 14 2017

Keywords

Comments

Conjecture: every number is the sum of at most k - 4 generalized k-gonal numbers (for k >= 8).
In 1830, Legendre showed that for each integer m>4 every integer N >= 28*(m-2)^3 can be written as the sum of five m-gonal numbers. In 1994 R. K. Guy proved that each natural number is the sum of three generalized pentagonal numbers. In a 2016 paper Zhi-Wei Sun proved that each natural number is the sum of four octagonal numbers. - Zhi-Wei Sun, Oct 03 2020

Examples

			a(6) = 7 because we have [5, 1, 0], [5, 0, 1], [2, 2, 2], [1, 5, 0], [1, 0, 5], [0, 5, 1] and [0, 1, 5].
		

Crossrefs

Programs

  • Maple
    N:= 100;
    bds:= [fsolve(k*(3*k-1)/2 = N)];
    G:= add(x^(k*(3*k-1)/2),k=floor(min(bds))..ceil(max(bds)))^3:
    seq(coeff(G,x,n),n=0..N); # Robert Israel, Aug 16 2017
  • Mathematica
    nmax = 75; CoefficientList[Series[Sum[x^(k (3 k - 1)/2), {k, -nmax, nmax}]^3, {x, 0, nmax}], x]
    nmax = 75; CoefficientList[Series[Sum[x^((6 k^2 + 6 k + (-1)^(k + 1) (2 k + 1) + 1)/16), {k, 0, nmax}]^3, {x, 0, nmax}], x]
    nmax = 75; CoefficientList[Series[EllipticTheta[4, 0, x^3]^3/QPochhammer[x, x^2]^3, {x, 0, nmax}], x]

Formula

G.f.: (Sum_{k=-infinity..infinity} x^(k*(3*k-1)/2))^3.
G.f.: (Sum_{k>=0} x^A001318(k))^3.
G.f.: Product_{n >= 1} ( (1 - q^(3*n))/(1 - q^n + q^(2*n)) )^3. - Peter Bala, Jan 04 2025

A306260 Number of ways to write n as w*(4w+1) + x*(4x-1) + y*(4y-2) + z*(4z-3) with w,x,y,z nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 01 2019

Keywords

Comments

Conjecture 1: a(n) > 0 for all n >= 0, and a(n) = 1 only for n = 0, 1, 2, 4, 7, 9, 11, 14, 23, 25, 28, 37.
Conjecture 2: Each n = 0,1,2,... can be written as w*(4w+2) + x*(4x-1) + y*(4y-2) + z*(4z-3) with w,x,y,z nonnegative integers.
Conjecture 3: Each n = 0,1,2,... can be written as 4*w^2 + x*(4x+1) + y*(4y-2) + z*(4z-3) with w,x,y,z nonnegative integers.
We have verified that a(n) > 0 for all n = 0..2*10^6. By Theorem 1.3 in the linked 2017 paper of the author, any nonnegative integer can be written as x*(4x-1) + y*(4y-2) + z*(4z-3) with x,y,z integers.

Examples

			a(11) = 1 with 11 = 1*(4*1+1) + 1*(4*1-1) + 1*(4*1-2) + 1*(4*1-3).
a(23) = 1 with 23 = 2*(4*2+1) + 1*(4*1-1) + 1*(4*1-2) + 0*(4*0-3).
a(25) = 1 with 25 = 0*(4*0+1) + 1*(4*1-1) + 2*(4*2-2) + 2*(4*2-3).
a(28) = 1 with 28 = 2*(4*2+1) + 0*(4*0-1) + 0*(4*0-2) + 2*(4*2-3).
a(37) = 1 with 37 = 1*(4*1+1) + 1*(4*1-1) + 1*(4*1-2) + 3*(4*3-3).
		

Crossrefs

Programs

  • Mathematica
    QQ[n_]:=QQ[n]=IntegerQ[Sqrt[16n+1]]&&Mod[Sqrt[16n+1],8]==1;
    tab={};Do[r=0;Do[If[QQ[n-x(4x-1)-y(4y-2)-z(4z-3)],r=r+1],{x,0,(Sqrt[16n+1]+1)/8},{y,0,(Sqrt[4(n-x(4x-1))+1]+1)/4},{z,0,(Sqrt[16(n-x(4x-1)-y(4y-2))+9]+3)/8}];tab=Append[tab,r],{n,0,100}];Print[tab]
Showing 1-8 of 8 results.