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!)
A106594 a(n) = number of primitive solutions to 4n+1 = x^2 + y^2. 4
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, 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, 0, 1, 1, 0, 1, 1, 0, 0, 2, 0, 1, 1, 0, 2, 0, 0, 1, 0, 0, 1, 1, 0, 0, 2, 0, 1, 2, 0, 0, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,16
COMMENTS
"Primitive" means that x and y are positive and mutually prime.
LINKS
EXAMPLE
E.g. a(16)=2 because 65 = 8^2+1^2 = 7^2+4^2. a(11)=0 because although 45=6^2+3^2, 6 and 3 are not mutually prime. a(2)=0 because although 9=3^2+0^2, 0 is not positive.
MAPLE
A106594 := proc(n)
local a, x, y, fourn;
fourn := 4*n+1 ;
a := 0 ;
for x from 1 do
if x^2 >= fourn then
return a;
else
y := fourn-x^2 ;
if issqr(y) then
y := sqrt(y) ;
if y <= x and igcd(x, y) = 1 then
a := a+1 ;
end if;
end if;
end if;
end do:
end proc: # R. J. Mathar, Sep 21 2013
MATHEMATICA
Table[Length[If[CoprimeQ[#[[1]], #[[2]]], #, Nothing]&/@Union[Sort/@ ({#[[1, 2]], #[[2, 2]]}&/@FindInstance[{4 n+1==x^2+y^2, x>0, y>0}, {x, y}, Integers, 10])]], {n, 100}] (* Harvey P. Dale, Jun 29 2021 *)
CROSSREFS
Sequence in context: A285680 A240668 A106602 * A357070 A341026 A143251
KEYWORD
easy,nonn
AUTHOR
Colin Mallows, May 10 2005
STATUS
approved

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 April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)