A218800 Number of nonnegative integer solutions to x^2 + 2y^2 = (3n)^2.
1, 2, 2, 3, 2, 2, 3, 2, 2, 4, 2, 5, 3, 2, 2, 3, 2, 5, 4, 5, 2, 3, 5, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 8, 5, 2, 4, 2, 5, 3, 2, 5, 3, 5, 5, 4, 2, 2, 3, 2, 2, 8, 2, 2, 5, 5, 2, 8, 2, 5, 3, 2, 2, 4, 2, 2, 8, 5, 5, 3, 2, 2, 4, 5, 2, 3, 5, 5, 3, 2, 2, 6, 5, 5, 3, 5, 5
Offset: 0
Keywords
Examples
a(2) = 2 because we have 6^2 + 2*0^2 = 6^2 and 2^2 + 2*4^2 = 6^2 and no others.
Crossrefs
Cf. A218799.
Programs
-
JavaScript
for (i=0; i<200; i+=3) { d=0; e=0; for (a=0; a<=i; a++) for (b=0; b<=i; b++) { t1=Math.pow(a, 2)+2*Math.pow(b, 2); t2=Math.pow(i, 2); if (t1
Comments