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 A000549 #56 Oct 27 2023 18:23:26 %S A000549 1,2,4,5,8,10,13,16,20,25,32,37,40,52,58,64,80,85,100,128,130,148,160, %T A000549 208,232,256,320,340,400,512,520,592,640,832,928,1024,1280,1360,1600, %U A000549 2048,2080,2368,2560,3328,3712,4096,5120,5440,6400,8192,8320,9472,10240 %N A000549 Numbers that are the sum of 2 squares but not sum of 3 nonzero squares. %C A000549 It appears that starting at 64, the sequence follows the pattern, 2^(2n) + {0, 16, 21, 36, 64, 66, 84, 96, 144, 168} * 2^(2n-6) for n >= 3. - _T. D. Noe_, Jun 20 2012 %C A000549 Intersection of A001481 and A004214. - _Ralf Stephan_, Mar 28 2014 %H A000549 Robert Israel, <a href="/A000549/b000549.txt">Table of n, a(n) for n = 1..113</a> (first 100 terms from T. D. Noe) %H A000549 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a> %F A000549 Empirical g.f.: x*(1 +2*x +4*x^2 +5*x^3 +8*x^4 +10*x^5 +13*x^6 +16*x^7 +20*x^8 +25*x^9 +28*x^10 +29*x^11 +24*x^12 +32*x^13 +26*x^14 +24*x^15 +28*x^16 +21*x^17 +20*x^18 +28*x^19 +2*x^20) / ((1 -2*x^5)*(1 +2*x^5)). - _Colin Barker_, Feb 09 2016 %p A000549 # this requires Maple 17 or later %p A000549 m:= 5000: # to find all entries <= m^2 %p A000549 N:= m^2: %p A000549 with(SignalProcessing): %p A000549 with(ArrayTools): %p A000549 A1:= Array(0..N,datatype=float[8]): %p A000549 for i from 1 to m do A1[i^2]:= 1 end do: %p A000549 B:= Convolution(A1,A1): %p A000549 A2:= Array(0..N,datatype=float[8]): %p A000549 Copy(N+1,B,A2): %p A000549 All1:= Array(0..N,datatype=float[8],fill=1): %p A000549 MinimumEvery(A2,All1,container=A2): %p A000549 B:= Convolution(A1,A2): %p A000549 A3:= Array(0..N,datatype=float[8]): %p A000549 Copy(N+1,B,A3); %p A000549 MinimumEvery(A3,All1,container=A3); %p A000549 MaximumEvery(A1,A2,container=A2); %p A000549 B:= evalhf(map(round,A3-A2)); %p A000549 MinimumEvery(B,Array(0..N,datatype=float[8]),container=B); %p A000549 R:= ArrayTools[SearchArray](B); %p A000549 A000549:= map(`-`,convert(R,list),1); # _Robert Israel_, Mar 28 2014 %t A000549 A000549 = Reap[For[n=1, n <= 10^5, n++, If[SquaresR[2, n] != 0, If[Union[ PowersRepresentations[n, 3, 2][[All, 1]]] == {0}, Print[n]; Sow[n]]]] ][[2, 1]] (* _Jean-François Alcover_, Feb 09 2016 *) %o A000549 (MATLAB) Asq = zeros(1,10^7); %o A000549 Asq( [0:3162] .^ 2 + 1) = 1; %o A000549 Psq = zeros(1,10^7); %o A000549 Psq( [1:3162] .^ 2 + 1) = 1; %o A000549 As2 = conv(Asq,Asq); %o A000549 As2 = min(1, As2(1:10^7)); %o A000549 Ps2 = conv(Psq,Psq); %o A000549 Ps2 = min(1, Ps2(1:10^7)); %o A000549 As3 = conv(Asq,As2); %o A000549 As3 = min(1, As3(1:10^7)); %o A000549 Ps3 = conv(Psq,Ps2); %o A000549 Ps3 = min(1, Ps3(1:10^7)); %o A000549 D = As3 - Ps3; %o A000549 A000549 = find(D(2:end)) %o A000549 % _Robert Israel_, Mar 26 2014 %o A000549 (PARI) istwo(n)=if(n<3,return(n>=0)); my(f=factor(n>>valuation(n,2))); for(i=1,#f~, if(f[i,2]%2&&f[i,1]%4==3, return(0))); 1 %o A000549 is(n)=if(!istwo(n),return(0)); if(n<3, return(1)); for(x=sqrtint(n\3),sqrtint(n-2), my(t=n-x^2); for(y=sqrtint(t\2),sqrtint(t-1), if(t&&issquare(t-y^2), return(0)))); 1 \\ _Charles R Greathouse IV_, Jan 28 2016 %K A000549 nonn %O A000549 1,2 %A A000549 _N. J. A. Sloane_ and _J. H. Conway_ %E A000549 Extended by _T. D. Noe_, Jun 20 2012