|
|
A301579
|
|
Least nonnegative integer k such that n^2 - 3*2^k can be written as x^2 + 2*y^2 with x and y integers, or -1 if no such k exists.
|
|
6
|
|
|
-1, 0, 0, 2, 0, 0, 1, 4, 1, 0, 0, 2, 0, 0, 1, 6, 1, 0, 0, 2, 0, 2, 1, 4, 1, 0, 0, 2, 0, 3, 3, 8, 1, 0, 3, 2, 0, 0, 3, 4, 1, 0, 1, 4, 0, 0, 1, 6, 3, 0, 0, 2, 1, 0, 1, 4, 3, 0, 1, 5, 0, 5, 1, 10, 1, 0, 0, 2, 3, 0, 4, 4, 1, 2, 0, 2, 0, 0, 3, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
The Square Conjecture in A301471 implies that a(n) >= 0 for all n > 1.
It is known that a positive integer n has the form x^2 + 2*y^2 with x and y integers if and only if the p-adic order of n is even for any prime p == 5 or 7 (mod 8).
Numbers t such that a(t) = 0 are 2, 3, 5, 6, 10, 11, 13, 14, 18, 19, 21, 26, 27, 29, 34, 37, ... - Altug Alkan, Mar 26 2018
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = -1 since 1^2 - 3*2^k < 0 for all k = 0,1,2,....
a(31) = 3 since 31^2 - 3*2^3 = 17^2 + 2*18^2.
a(2^k) = 2*k - 2 for all k = 1,2,3,..., because (2^k)^2 - 3*2^(2*k-2) = (2^(k-1))^2 + 2*0^2, and (2^k)^2 - 3*2^j = 2^j*(2^(2*k-j) - 3) with 0 <= j < 2*k-2 cannot be written as x^2 + 2*y^2 with x and y integers.
|
|
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[Do[If[QQ[n^2-3*2^k], tab=Append[tab, k]; Goto[aa]], {k, 0, Log[2, n^2/3]}]; tab=Append[tab, -1]; Label[aa], {n, 1, 80}]; Print[tab]
|
|
CROSSREFS
|
Cf. A000079, A000290, A002479, A299924, A299537, A299794, A300219, A300362, A300396, A300510, A301376, A301391, A301452, A301471, A301472, A301479.
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|