A274274 Number of ordered ways to write n as x^3 + y^2 + z^2, where x,y,z are nonnegative integers with y <= z.
1, 2, 2, 1, 1, 2, 1, 0, 2, 3, 3, 1, 1, 2, 1, 0, 2, 3, 3, 1, 1, 2, 0, 0, 1, 3, 4, 2, 2, 2, 1, 1, 2, 3, 2, 2, 2, 4, 1, 0, 3, 2, 2, 1, 2, 3, 1, 1, 1, 2, 3, 2, 3, 4, 1, 0, 1, 1, 3, 2, 1, 3, 1, 1, 3, 4, 4, 1, 3, 3, 0, 0, 4, 5, 3, 1, 2, 3, 0, 1, 4
Offset: 0
Keywords
Examples
a(6) = 1 since 6 = 1^3 + 1^2 + 2^2. a(14) = 1 since 14 = 1^3 + 2^2 + 3^2. a(31) = 1 since 31 = 3^3 + 0^2 + 2^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] Do[r=0;Do[If[SQ[n-x^3-y^2],r=r+1],{x,0,n^(1/3)},{y,0,Sqrt[(n-x^3)/2]}];Print[n," ",r];Continue,{n,0,80}]
Comments