login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A106602 Number of primitive positive solutions to 8n+2=x^2+y^2. 2

%I #8 Sep 21 2013 16:11:38

%S 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 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 0,1,1,0,1,1,0

%N Number of primitive positive solutions to 8n+2=x^2+y^2.

%H R. J. Mathar, <a href="/A106602/b106602.txt">Table of n, a(n) for n = 0..1000</a>

%e 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 := proc(n)

%p local a,x,y,fourn;

%p fourn := 8*n+2 ;

%p a := 0 ;

%p for x from 1 do

%p if x^2 >= fourn then

%p return a;

%p else

%p y := fourn-x^2 ;

%p if issqr(y) then

%p y := sqrt(y) ;

%p if y <= x and igcd(x,y) = 1 then

%p a := a+1 ;

%p end if;

%p end if;

%p end if:

%p end do:

%p end proc: # _R. J. Mathar_, Sep 21 2013

%Y Cf. A106594.

%K easy,nonn

%O 0,17

%A _Colin Mallows_, May 10 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 07:01 EDT 2024. Contains 372358 sequences. (Running on oeis4.)