# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a301805 Showing 1-1 of 1 %I A301805 #39 Apr 15 2018 21:53:12 %S A301805 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, %T A301805 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, %U A301805 8,7,8,6,10,6,10,6,8,8,8,5 %N 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. %C A301805 It might seem that a(n) > 0 for all n > 2. However, we find that a(323525083) = 0, moreover 3*323525083^2 cannot be written as x^2 + 10*y^2 + 2^z with x,y,z nonnegative integers. We note also that a(270035155) = 0 but 3*270035155^2 - 2^0 has the form x^2 + 10*y^2 with x and y integers. %C A301805 My way to check whether 3*n^2 can be written as x^2 + 10*y^2 + 2^z is to find z such that 3*n^2 - 2^z can be written as x^2 + 10*y^2. I observe that a positive integer n has the form x^2 + 10*y^2 with x and y integers if and only if the p-adic order ord_p(n) of n is even for any prime p == 3, 17, 21, 27, 29, 31, 33, 39 (mod 40) and the sum of those ord_p(n) with p prime and p == 2, 5, 7, 13, 23, 37 (mod 40) is even. %C A301805 From _David A. Corneth_, Mar 27 2018: (Start) %C A301805 If a(n) > 0 then a(2*n) > 0; 3*n^2 = x^2 + 10*y^2 + 2^z <=> 3*(2*n)^2 = 4 * 3*n^2 = 4 * (x^2 + 10*y^2 + 2^z) = (2*x)^2 + 10 * (2*y)^2 + 2^(z + 2). %C A301805 So we just need to check odd n and as z > 0, 2 | 2^z and furthermore 2 | 10 * y^2 so 3*x^2 must be odd, i.e., x must be odd for 3*n^2 to be odd. Also, y must be odd. For odd n, 3*n^2 == 3 (mod 4), for odd x, x^2 == (1 mod 4), for z >= 3, 2^z == 0 (mod 4) so 10 * y^2 must be == 2 (mod 4) which happens if and only if y is odd. (End) %H A301805 Zhi-Wei Sun, Table of n, a(n) for n = 1..800 %H A301805 Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190. %H A301805 Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017-2018. %e A301805 a(1) = a(2) = 0 since 3*1^2 < 3*2^2 < 2^4. %e A301805 a(3) = 1 since 3*3^2 = 1^2 + 10*1^2 + 2^4. %e A301805 a(4) = 1 since 3*4^2 = 4^2 + 10*0^2 + 2^5. %t A301805 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; %t A301805 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] %Y A301805 Cf. A000079, A000290, A020673, A299924, A299537, A299794, A300219, A300362, A300396, A300510, A301376, A301391, A301452, A301471, A301472, A301479, A301579, A301640. %K A301805 nonn %O A301805 1,5 %A A301805 _Zhi-Wei Sun_, Mar 27 2018 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE