A270469 Number of ordered ways to write n = x^3 + y*(y+1) + z*(3*z+2), where x and y are nonnegative integers and z is a nonzero integer.
1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 3, 1, 2, 2, 3, 2, 2, 3, 2, 1, 4, 4, 2, 2, 2, 2, 1, 5, 4, 2, 2, 2, 3, 4, 4, 5, 2, 2, 3, 3, 5, 2, 5, 3, 2, 4, 5, 4, 2, 3, 3, 3, 3, 4, 3, 1, 2, 5, 3, 4, 3, 4, 4, 4, 5, 4, 3, 4, 4, 3, 6, 5, 5, 3, 3, 3, 6, 6, 2, 4
Offset: 1
Keywords
Examples
a(10) = 1 since 10 = 0^3 + 1*2 + (-2)(3*(-2)+2). a(12) = 1 since 12 = 1^3 + 2*3 + 1*(3*1+2). a(20) = 1 since 20 = 0^3 + 3*4 + (-2)*(3*(-2)+2). a(27) = 1 since 27 = 0^3 + 2*3 + (-3)*(3*(-3)+2). a(56) = 1 since 56 = 0^3 + 0*1 + 4*(3*4+2). a(101) = 1 since 101 = 2^3 + 8*9 + (-3)*(3*(-3)+2).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
pQ[x_]:=pQ[x]=x>0&&IntegerQ[Sqrt[3x+1]] Do[r=0;Do[If[pQ[n-x^3-y(y+1)],r=r+1],{x,0,n^(1/3)},{y,0,(Sqrt[4(n-x^3)+1]-1)/2}];Print[n," ",r];Continue,{n,1,80}]
Comments