login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A302641 Number of nonnegative integers k such that n^2 - 3*2^k can be written as x^2 + 2*y^2 with x and y integers. 2
0, 1, 2, 1, 3, 3, 3, 1, 3, 4, 4, 3, 4, 4, 5, 1, 4, 4, 4, 4, 5, 4, 3, 3, 6, 5, 5, 4, 5, 5, 5, 1, 4, 5, 6, 4, 5, 5, 6, 4, 5, 6, 6, 4, 7, 4, 7, 3, 3, 7, 4, 5, 6, 6, 5, 4, 7, 6, 6, 5, 6, 5, 6, 1, 7, 5, 6, 5, 7, 7, 4, 4, 6, 5, 8, 5, 6, 7, 5, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The author's Square Conjecture in A301471 implies that a(n) > 0 for all n > 1.
We have a(2^n) = 1 for all n > 0. In fact, (2^n)^2 = (2^(n-1))^2 + 2*0^2 + 3*2^(2*n-2). If k > 2*n-2 then 3*2^k >= 6*2^(2*n-2) > (2^n)^2. If 0 <= k < 2*n-2, then 2*n-k is at least 3 and hence (2^n)^2 - 3*2^k = 2^k*(2^(2*n-k)-3) cannot be written as x^2 + 2*y^2 with x and y integers.
LINKS
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.
Zhi-Wei Sun, My square conjecture with prize, a message to Number Theory List, April 7, 2018.
EXAMPLE
a(2) = 1 with 2^2 = 1^2 + 2*0^2 + 3*2^0.
a(3) = 2 with 3^2 = 2^2 + 2*1^2 + 3*2^0 = 1^2 + 2*1^2 + 3*2^1.
a(2857932461) = 1 since 3 is the only nonnegative integer k such that 2857932461^2 - 3*2^k has the form x^2 + 2*y^2 with x and y integers.
a(4428524981) = 2 since 3 and 8 are the only nonnegative integers k such that 4428524981^2 - 3*2^k has the form x^2 + 2*y^2 with x and y integers.
a(4912451281) = 3 since 3, 6 and 7 are the only nonnegative integers k with 4428524981^2 - 3*2^k = x^2 + 2*y^2 for some integers x and y.
MATHEMATICA
f[n_]:=f[n]=FactorInteger[n];
g[n_]:=g[n]=Sum[Boole[(Mod[Part[Part[f[n], i], 1], 8]==5||Mod[Part[Part[f[n], i], 1], 8]==7)&&Mod[Part[Part[f[n], i], 2], 2]==1], {i, 1, Length[f[n]]}]==0;
QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
tab={}; Do[r=0; Do[If[QQ[n^2-3*2^k], r=r+1], {k, 0, Log[2, n^2/3]}]; tab=Append[tab, r], {n, 1, 80}]; Print[tab]
CROSSREFS
Sequence in context: A334300 A308093 A264154 * A099246 A303119 A039775
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 10 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 12:24 EDT 2024. Contains 375269 sequences. (Running on oeis4.)