A262824 Number of ordered ways to write n as w^2 + x^3 + 2*y^3 + 3*z^3, where w, x, y and z are nonnegative integers.
1, 2, 2, 3, 4, 3, 3, 3, 2, 3, 3, 3, 4, 2, 3, 2, 2, 5, 2, 4, 5, 3, 2, 1, 4, 5, 5, 6, 8, 5, 4, 5, 3, 7, 3, 4, 8, 1, 4, 3, 4, 7, 4, 5, 4, 3, 3, 3, 3, 6, 5, 3, 9, 3, 4, 7, 3, 7, 3, 5, 4, 2, 6, 5, 4, 6, 8, 7, 8, 5, 5, 5, 1, 6, 4, 3, 7, 2, 5, 5, 5, 8, 8, 10, 9, 6, 3, 7, 6, 8, 9, 9, 8, 5, 6, 4, 3, 6, 7, 4, 7
Offset: 0
Keywords
Examples
a(0) = 1 since 0 = 0^2 + 0^3 + 2*0^3 + 3*0^3. a(8) = 2 since 8 = 2^2 + 1^3 + 2*0^3 + 3*1^3 = 0^2 + 2^3 + 2*0^3 + 3*0^3. a(23) = 1 since 23 = 2^2 + 0^3 + 2*2^3 + 3*1^3. a(37) = 1 since 37 = 6^2 + 1^3 + 2*0^3 + 3*0^3. a(72) = 1 since 72 = 8^2 + 2^3 + 2*0^3 + 3*0^3.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
SQ[n_]:=IntegerQ[Sqrt[n]] Do[r=0;Do[If[SQ[n-x^3-2y^3-3z^3],r=r+1],{x,0,n^(1/3)},{y,0,((n-x^3)/2)^(1/3)},{z,0,((n-x^3-2y^3)/3)^(1/3)}];Print[n," ",r];Continue,{n,1,100}]
Comments