A262857 Number of ordered ways to write n as w^3 + 2*x^3 + y^2 + 2*z^2, where w, x, y and z are nonnegative integers.
1, 2, 3, 4, 4, 3, 3, 2, 3, 5, 5, 6, 6, 3, 4, 1, 4, 6, 7, 10, 7, 5, 4, 2, 5, 8, 8, 9, 9, 6, 6, 2, 6, 10, 8, 13, 9, 6, 7, 5, 5, 8, 6, 9, 10, 6, 9, 4, 5, 9, 6, 13, 10, 7, 11, 6, 8, 10, 8, 10, 12, 9, 9, 7, 8, 13, 10, 16, 12, 6, 12, 8, 10, 13, 12, 13, 12, 8, 11, 7, 10, 16, 15, 17, 16, 6, 11, 7, 12, 16, 11, 16, 9, 10, 5, 6, 10, 15, 17, 18, 16
Offset: 0
Keywords
Examples
a(7) = 2 since 7 = 1^3 + 2*0^3 + 2^2 + 2*1^2 = 1^3 + 2*1^3 + 2^2 + 2*0^2. a(15) = 1 since 15 = 1^3 + 2*1^3 + 2^2 + 2*2^2.
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-2z^2],r=r+1],{x,0,n^(1/3)},{y,0,((n-x^3)/2)^(1/3)},{z,0,Sqrt[(n-x^3-2y^3)/2]}];Print[n," ",r];Continue,{n,0,100}]
Comments