|
|
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
|
|
|
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
|
Cf. A000079, A000290, A002479, A299924, A299537, A299794, A300219, A300362, A300396, A300510, A301376, A301391, A301452, A301472, A301479, A301579, A301640.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|