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 A106602 #8 Sep 21 2013 16:11:38 %S A106602 1,1,0,1,1,0,1,1,0,1,1,0,0,1,0,1,2,0,1,0,0,2,1,0,1,1,0,1,1,0,0,1,0,0, %T A106602 1,0,2,1,0,1,0,0,1,1,0,1,2,0,1,1,0,2,0,0,0,2,0,1,1,0,1,0,0,0,1,0,2,1, %U A106602 0,1,1,0,1,1,0 %N A106602 Number of primitive positive solutions to 8n+2=x^2+y^2. %H A106602 R. J. Mathar, <a href="/A106602/b106602.txt">Table of n, a(n) for n = 0..1000</a> %e A106602 a(16)=2 because we have 130=11^2+3^2=9^2+7^2. a(2)=0 because although 18=3^2+3^2, these components are not mutually prime. %p A106602 A106602 := proc(n) %p A106602 local a,x,y,fourn; %p A106602 fourn := 8*n+2 ; %p A106602 a := 0 ; %p A106602 for x from 1 do %p A106602 if x^2 >= fourn then %p A106602 return a; %p A106602 else %p A106602 y := fourn-x^2 ; %p A106602 if issqr(y) then %p A106602 y := sqrt(y) ; %p A106602 if y <= x and igcd(x,y) = 1 then %p A106602 a := a+1 ; %p A106602 end if; %p A106602 end if; %p A106602 end if: %p A106602 end do: %p A106602 end proc: # _R. J. Mathar_, Sep 21 2013 %Y A106602 Cf. A106594. %K A106602 easy,nonn %O A106602 0,17 %A A106602 _Colin Mallows_, May 10 2005