OFFSET
1,3
COMMENTS
a(n) is odd iff x^2 + y^2 == 5 (mod 8). [Vladimir Shevelev, Jul 12 2009]
REFERENCES
E. Kogbetliantz and A. Krikorian, Handbook of First Complex Prime Numbers, Gordon and Breach, NY, 1971, p. 243.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Rainer Rosenthal, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
S. R. Finch, Powers of Euler's q-Series, arXiv:math/0701251 [math.NT], 2007.
E. Kogbetliantz and A. Krikorian, Handbook of First Complex Prime Numbers, Gordon and Breach, NY, 1971. [Annotated scans of a few pages]
FORMULA
EXAMPLE
The 3rd prime of the form 4i+1 is 17 = 1^2 + 4^2, so a(3) = 4/2 = 2.
MATHEMATICA
pmax = 1000; k[p_] := Module[{k, m}, k /. ToRules[Reduce[k>0 && m >= 0 && (2k)^2 + (2m+1)^2 == p, {k, m}, Integers]]]; For[n=1; p=5, p<pmax, p = NextPrime[p], If[Mod[p, 4]==1, a[n] = k[p]; Print["a(", n, ") = ", a[n]]; n++]]; Array[a, n-1] (* Jean-François Alcover, Feb 26 2016 *)
PROG
(PARI) \\ use function decomp2sq from A002972
forprime (p=5, 1000, if (p%4==1, print1(select(x->!(x%2), decomp2sq(p))[1]/2, ", "))) \\ Hugo Pfoertner, Aug 27 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Better description from Jud McCranie, Mar 05 2003
STATUS
approved