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.

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]