A301805 Number of ways to write 3*n^2 as x^2 + 10*y^2 + 2^z, where x, y and z are nonnegative integers with z > 3.
0, 0, 1, 1, 2, 2, 3, 3, 3, 2, 4, 4, 4, 4, 4, 4, 6, 4, 4, 3, 5, 4, 4, 5, 7, 5, 4, 4, 6, 4, 7, 5, 5, 7, 7, 5, 5, 4, 8, 5, 7, 6, 11, 6, 6, 5, 8, 5, 6, 7, 5, 7, 6, 5, 5, 5, 7, 7, 4, 4, 8, 8, 8, 6, 6, 6, 9, 8, 8, 7, 8, 6, 10, 6, 10, 6, 8, 8, 8, 5
Offset: 1
Keywords
Examples
a(1) = a(2) = 0 since 3*1^2 < 3*2^2 < 2^4. a(3) = 1 since 3*3^2 = 1^2 + 10*1^2 + 2^4. a(4) = 1 since 3*4^2 = 4^2 + 10*0^2 + 2^5.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..800
- Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.
- Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017-2018.
Crossrefs
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; tab={};Do[r=0;Do[If[SQ[3*n^2-2^k-10x^2],r=r+1],{k,4,Log[2,3n^2]},{x,0,(3*n^2-2^k)/10}];tab=Append[tab,r],{n,1,80}];Print[tab]
Comments