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.

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]