OFFSET
1,2
COMMENTS
a(n)^2 + 4*A002973(n)^2 = A002144(n); A002331(n+1) = Min(a(n),2*A002973(n)) and A002330(n+1) = Max(a(n),2*A002973(n)). - Reinhard Zumkeller, Feb 16 2010
It appears that the terms in this sequence are the absolute values of the terms in A046730. - Gerry Myerson, Dec 02 2010
(a(n) - 1)/2 = A208295(n), n >= 1. - Wolfdieter Lang, Mar 03 2012
a(A267858(k)) == 1 (mod 4), k >= 1. - Wolfdieter Lang, Feb 18 2016
"the n-th prime of the form 4i+1" is A005098(n). - Rainer Rosenthal, Aug 24 2022
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]
Stan Wagon, Editor’s Corner: The Euclidean Algorithm Strikes Again, The American Mathematical Monthly, vol. 97, no. 2, 1990, pp. 125-29. [Description of efficient decomposition algorithm implemented in PARI program]
FORMULA
EXAMPLE
The 2nd prime of the form 4i+1 is 13 = 2^2 + 3^2, so a(2)=3.
MATHEMATICA
pmax = 1000; odd[p_] := Module[{k, m}, 2m+1 /. 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] = odd[p]; Print["a(", n, ") = ", a[n]]; n++]]; Array[a, n-1] (* Jean-François Alcover, Feb 26 2016 *)
PROG
(PARI) decomp2sq(p) = {my (m=(p-1)/4, r, x, limit=ceil(sqrt(p))); if (p>4 && denominator(m)==1, forprime (c=2, oo, if (!issquare(Mod(c, p)), r=c; break)); x=lift (Mod(r, p)^m); until (p<limit, r=p%x; p=x; x=r); if(p^2+x^2==4*m+1, [p, x], [0, 0]), [0, 0])};
forprime (p=5, 1000, if (p%4==1, print1(select(x->x%2, decomp2sq(p))[1], ", "))) \\ Hugo Pfoertner, Aug 27 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Better description from Jud McCranie, Mar 05 2003
STATUS
approved