This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A301579 #13 Mar 27 2018 09:32:59 %S A301579 -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, %T A301579 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, %U A301579 3,0,4,4,1,2,0,2,0,0,3,6 %N 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. %C A301579 The Square Conjecture in A301471 implies that a(n) >= 0 for all n > 1. %C A301579 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). %C A301579 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 %H A301579 Zhi-Wei Sun, <a href="/A301579/b301579.txt">Table of n, a(n) for n = 1..10000</a> %H A301579 Zhi-Wei Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2016.11.008">Refining Lagrange's four-square theorem</a>, J. Number Theory 175(2017), 167-190. %H A301579 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1701.05868">Restricted sums of four squares</a>, arXiv:1701.05868 [math.NT], 2017-2018. %e A301579 a(1) = -1 since 1^2 - 3*2^k < 0 for all k = 0,1,2,.... %e A301579 a(31) = 3 since 31^2 - 3*2^3 = 17^2 + 2*18^2. %e A301579 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. %t A301579 f[n_]:=f[n]=FactorInteger[n]; %t A301579 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; %t A301579 QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]); %t A301579 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] %Y A301579 Cf. A000079, A000290, A002479, A299924, A299537, A299794, A300219, A300362, A300396, A300510, A301376, A301391, A301452, A301471, A301472, A301479. %K A301579 sign %O A301579 1,4 %A A301579 _Zhi-Wei Sun_, Mar 23 2018