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

A306606 Number of ways to write n as w^2 + T(x)^2 + Pen(y)^2 + 2*Pen(z)^2, where w,x,y,z are integers with w > 0 and x >= 0, and T(m) = m*(m+1)/2 and Pen(m) = m*(3m-1)/2.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 28 2019

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. In other words, any positive integer n can be written as s^2 + t^2 + u^2 + 2*v^2, where s is a positive integer, t is a triangular number, u and v are generalized pentagonal numbers.
I have verified a(n) > 0 for all n = 1..5*10^6.
It is well known that any positive odd integer can be written as x^2 + y^2 + 2*z^2 with x,y,z integers.
See also A306614 for similar conjectures.

Examples

			a(1) = 1 with 1 = 1^2 + T(0)^2 + Pen(0)^2 + 2*Pen(0)^2.
a(23) = 1 with 23 = 4^2 + T(1)^2 + Pen(-1)^2 + 2*Pen(1)^2.
a(335) = 1 with 335 = 18^2 + T(2)^2 + Pen(0)^2 + 2*Pen(1)^2.
a(3695) = 1 with 3695 = 53^2 + T(7)^2 + Pen(-1)^2 + 2*Pen(-2)^2.
		

Crossrefs

Programs

  • Mathematica
    t[x_]:=t[x]=x(x+1)/2; p[x_]:=p[x]=x(3x-1)/2;
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[SQ[n-t[x]^2-p[y]^2-2*p[z]^2],r=r+1],{x,0,(Sqrt[8*Sqrt[n-1]+1]-1)/2},{y,-Floor[(Sqrt[24*Sqrt[n-1-t[x]^2]+1]-1)/6],(Sqrt[24*Sqrt[n-1-t[x]^2]+1]+1)/6},
    {z,-Floor[(Sqrt[24*Sqrt[(n-1-t[x]^2-p[y]^2)/2]+1]-1)/6],(Sqrt[24*Sqrt[(n-1-t[x]^2-p[y]^2)/2]+1]+1)/6}];tab=Append[tab,r],{n,1,100}];Print[tab]

A306690 Number of ways to write n as u^4 + (v*(v+1)/2)^2 + (x*(3x+1)/2)^2 + (y*(5y+1)/2)^2 + (z*(9z+1)/2)^2, where u and v are nonnegative integers and x,y,z are integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 05 2019

Keywords

Comments

Conjecture 1: a(n) > 0 for any nonnegative integer n.
Conjecture 2: Each n = 0,1,2,... can be written as f(u,v,x,y,z) with u,v,x,y,z integers, where f is any of the following polynomials: u^4 + (v*(v+1)/2)^2 + (x*(3x+1)/2)^2 + (y*(5y+1)/2)^2 + (z*(5z+3)/2)^2, u^4 + (v*(v+1)/2)^2 + (x*(3x+1)/2)^2 + (y*(5y+1)/2)^2 + (z*(3z+2))^2, (u*(u+1)/2)^2 + (v*(3v+1)/2)^2 + (x*(5x+1)/2)^2 + (y*(5y+3)/2)^2 + (z*(3z+2))^2, (u*(u+1)/2)^2 + (v*(3v+1)/2)^2 + (x*(5x+1)/2)^2 + (y*(5y+3)/2)^2 + (z*(4z+3))^2, (u*(u+1)/2)^2 + (v*(3v+1)/2)^2 + (x*(5x+1)/2)^2 + (y*(5y+3)/2)^2 + (z*(9z+7)/2)^2.
We have verified Conjectures 1 and 2 for n up to 2*10^6 and 10^6 respectively.

Examples

			a(8) = 1 with 8 = 0^4 + (0*(0+1)/2)^2 + (1*(3*1+1)/2)^2 + ((-1)*(5*(-1)+1)/2)^2 + (0*(9*0+1)/2)^2.
a(2953) = 1 with 2953 = 6^4 + (8*(8+1)/2)^2 + (0*(3*0+1)/2)^2 + (0*(5*0+1)/2)^2 + (2*(9*2+1)/2)^2.
a(8953) = 1 with 8953 = 2^4 + (7*(7+1)/2)^2 + (6*(3*6+1)/2)^2 + ((-1)*(5*(-1)+1)/2)^2 + ((-4)*(9*(-4)+1)/2)^2.
		

Crossrefs

Programs

  • Mathematica
    t[x_]:=t[x]=(x(x+1)/2)^2; f[x_]:=f[x]=(x(5x+1)/2)^2; g[x_]:=g[x]=(x(9x+1)/2)^2; SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; PQ[n_]:=PQ[n]=SQ[n]&&SQ[24*Sqrt[n]+1];
    tab={};Do[r=0;Do[If[PQ[n-k^4-t[x]-f[y]-g[z]],r=r+1],{k,0,n^(1/4)},{x,0,(Sqrt[8*Sqrt[n-k^4]+1]-1)/2},{y,-Floor[(Sqrt[40*Sqrt[n-k^4-t[x]]+1]+1)/10],(Sqrt[40*Sqrt[n-k^4-t[x]]+1]-1)/10},{z,-Floor[(Sqrt[72*Sqrt[n-k^4-t[x]-f[y]]+1]+1)/18],(Sqrt[72*Sqrt[n-k^4-t[x]-f[y]]+1]-1)/18}];tab=Append[tab,r],{n,0,100}];Print[tab]
Showing 1-2 of 2 results.