A002144 Pythagorean primes: primes of the form 4*k + 1.
5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 541, 557, 569, 577, 593, 601, 613, 617
Offset: 1
Examples
The following table shows the relationship between several closely related sequences: Here p = A002144 = primes == 1 (mod 4), p = a^2+b^2 with a < b; a = A002331, b = A002330, t_1 = ab/2 = A070151; p^2 = c^2 + d^2 with c < d; c = A002366, d = A002365, t_2 = 2ab = A145046, t_3 = b^2 - a^2 = A070079, with {c,d} = {t_2, t_3}, t_4 = cd/2 = ab(b^2-a^2). --------------------------------- p a b t_1 c d t_2 t_3 t_4 --------------------------------- 5 1 2 1 3 4 4 3 6 13 2 3 3 5 12 12 5 30 17 1 4 2 8 15 8 15 60 29 2 5 5 20 21 20 21 210 37 1 6 3 12 35 12 35 210 41 4 5 10 9 40 40 9 180 53 2 7 7 28 45 28 45 630 ... a(7) = 53 = A002972(7)^2 + (2*A002973(7))^2 = 7^2 + (2*1)^2 = 49 + 4, and this is the only way. - _Wolfdieter Lang_, Jan 13 2015
References
- David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
- L. E. Dickson, "History of the Theory of Numbers", Chelsea Publishing Company, 1919, Vol I, page 386
- L. E. Dickson, History of the Theory of Numbers, Carnegie Institution, Publ. No. 256, Vol. II, Washington D.C., 1920, p. 227.
- G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 132.
- M. du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; see p. 76.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 241, 243.
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 90.
Links
- Zak Seidov, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math.Series 55, Tenth Printing, 1972.
- C. Banderier, Calcul de (-1/p).
- J. Butcher, Mathematical Miniature 8: The Quadratic Residue Theorem, NZMS Newsletter, No. 75, April 1999.
- Hing Lun Chan, Windmills of the minds: an algorithm for Fermat's Two Squares Theorem, arXiv:2112.02556 [cs.LO], 2021.
- R. Chapman, Quadratic reciprocity.
- A. David Christopher, A partition-theoretic proof of Fermat's Two Squares Theorem, Discrete Mathematics, Volume 339, Issue 4, 6 April 2016, Pages 1410-1411.
- J. E. Ewell, A Simple Proof of Fermat's Two-Square Theorem, The American Mathematical Monthly, Vol. 90, No. 9 (Nov., 1983), pp. 635-637.
- Bernard Frénicle de Bessy, Traité des triangles rectangles en nombres : dans lequel plusieurs belles propriétés de ces triangles sont démontrées par de nouveaux principes, Michalet, Paris (1676) pp. 0-116; see p. 44, Consequence II.
- Bernard Frénicle de Bessy, Méthode pour trouver la solution des problèmes par les exclusions. Abrégé des combinaisons. Des Quarrez magiques, in "Divers ouvrages de mathématiques et de physique, par MM. de l'Académie royale des sciences", (1693) "Troisième exemple", pp. 17-26, see in particular p. 25.
- A. Granville and G. Martin, Prime number races, arXiv:math/0408319 [math.NT], 2004.
- D. & C. Hazzlewood, Quadratic Reciprocity.
- Ernest G. Hibbs, Component Interactions of the Prime Numbers, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.
- Lucas Lacasa, Bartolome Luque, Ignacio Gómez, and Octavio Miramontes, On a Dynamical Approach to Some Prime Number Sequences, Entropy 20.2 (2018): 131, also arXiv:1802.08349 [math.NT], 2018.
- R. C. Laubenbacher and D. J. Pengelley, Eisenstein's Misunderstood Geometric Proof of the Quadratic Reciprocity Theorem, In: Anderson M, Katz V, Wilson R, eds. Who Gave You the Epsilon?: And Other Tales of Mathematical History. Spectrum. Mathematical Association of America; 2009:309-312.
- R. C. Laubenbacher and D. J. Pengelley, Gauss, Eisenstein and the 'third' proof of the Quadratic Reciprocity Theorem, The Mathematical Intelligencer 16, 67-72 (1994).
- K. Matthews, Serret's algorithm based Server.
- Jorma K. Merikoski, Pentti Haukkanen, and Timo Tossavainen, The congruence x^n = -a^n (mod m): Solvability and related OEIS sequences, Notes. Num. Theor. Disc. Math. (2024) Vol. 30, No. 3, 516-529. See p. 521.
- Carlos Rivera, Puzzle 968. Another property of primes 4m+1, The Prime Puzzles & Problems Connection.
- D. Shanks, Review of "K. E. Kloss et al., Class number of primes of the form 4n+1", Math. Comp., 23 (1969), 213-214. [Annotated scanned preprint of review]
- S. A. Shirali, A family portrait of primes-a case study in discrimination, Math. Mag. Vol. 70, No. 4 (Oct., 1997), pp. 263-272.
- Rosemary Sullivan and Neil Watling, Independent divisibility pairs on the set of integers from 1 to n, INTEGERS 13 (2013) #A65.
- Eric Weisstein's World of Mathematics, Wilson's Theorem.
- Eric Weisstein's World of Mathematics, Pythagorean Triples.
- Wikipedia, Quadratic reciprocity
- Wolfram Research, The Gauss Reciprocity Law.
- G. Xiao, Two squares.
- D. Zagier, A One-Sentence Proof That Every Prime p == 1 (mod 4) Is a Sum of Two Squares, Am. Math. Monthly, Vol. 97, No. 2 (Feb 1990), p. 144. [From _Wolfdieter Lang_, Jan 17 2015 (thanks to Charles Nash)]
- Index to sequences related to decomposition of primes in quadratic fields.
Crossrefs
Programs
-
Haskell
a002144 n = a002144_list !! (n-1) a002144_list = filter ((== 1) . a010051) [1,5..] -- Reinhard Zumkeller, Mar 06 2012, Feb 22 2011
-
Magma
[a: n in [0..200] | IsPrime(a) where a is 4*n + 1 ]; // Vincenzo Librandi, Nov 23 2014
-
Maple
a := []; for n from 1 to 500 do if isprime(4*n+1) then a := [op(a),4*n+1]; fi; od: A002144 := n->a[n]; # alternative A002144 := proc(n) option remember ; local a; if n = 1 then 5; else for a from procname(n-1)+4 by 4 do if isprime(a) then return a; end if; end do: end if; end proc: seq(A002144(n),n=1..100) ; # R. J. Mathar, Jan 31 2024
-
Mathematica
Select[4*Range[140] + 1, PrimeQ[ # ] &] (* Stefan Steinerberger, Apr 16 2006 *) Select[Prime[Range[150]],Mod[#,4]==1&] (* Harvey P. Dale, Jan 28 2021 *)
-
PARI
select(p->p%4==1,primes(1000))
-
PARI
A002144_next(p=A2144[#A2144])={until(isprime(p+=4),);p} /* NB: p must be of the form 4k+1. Beyond primelimit, this is *much* faster than forprime(p=...,, p%4==1 && return(p)). */ A2144=List(5); A002144(n)={while(#A2144
A002144_next())); A2144[n]} \\ M. F. Hasler, Jul 06 2024 -
Python
from sympy import prime A002144 = [n for n in (prime(x) for x in range(1,10**3)) if not (n-1) % 4] # Chai Wah Wu, Sep 01 2014
-
Python
from sympy import isprime print(list(filter(isprime, range(1, 618, 4)))) # Michael S. Branicky, May 13 2021
-
SageMath
def A002144_list(n): # returns all Pythagorean primes <= n return [x for x in prime_range(5,n+1) if x % 4 == 1] A002144_list(617) # Peter Luschny, Sep 12 2012
Formula
Odd primes of form x^2 + y^2, (x=A002331, y=A002330, with x < y) or of form u^2 + 4*v^2, (u = A002972, v = A002973, with u odd). - Lekraj Beedassy, Jul 16 2004
p^2 - 1 = 12*Sum_{i = 0..floor(p/4)} floor(sqrt(i*p)) where p = a(n) = 4*n + 1. [Shirali]
a(n) = A000290(A002972(n)) + A000290(2*A002973(n)) = A000290(A002331(n+1)) + A000290(A002330(n+1)). - Reinhard Zumkeller, Feb 16 2010
a(n) = A002972(n)^2 + (2*A002973(n))^2, n >= 1. See the Jean-Christophe Hervé Nov 11 2013 comment. - Wolfdieter Lang, Jan 13 2015
a(n) = 4*A005098(n) + 1. - Zak Seidov, Sep 16 2018
From Vaclav Kotesovec, Apr 30 2020: (Start)
Product_{k>=1} (1 - 1/a(k)^2) = A088539.
Product_{k>=1} (1 + 1/a(k)^2) = A243380.
Product_{k>=1} (1 - 1/a(k)^3) = A334425.
Product_{k>=1} (1 + 1/a(k)^3) = A334424.
Product_{k>=1} (1 - 1/a(k)^4) = A334446.
Product_{k>=1} (1 + 1/a(k)^4) = A334445.
Product_{k>=1} (1 - 1/a(k)^5) = A334450.
Product_{k>=1} (1 + 1/a(k)^5) = A334449. (End)
From Vaclav Kotesovec, May 05 2020: (Start)
Product_{k>=1} (1 + 1/A002145(k)) / (1 + 1/a(k)) = Pi/(4*A064533^2) = 1.3447728438248695625516649942427635670667319092323632111110962...
Product_{k>=1} (1 - 1/A002145(k)) / (1 - 1/a(k)) = Pi/(8*A064533^2) = 0.6723864219124347812758324971213817835333659546161816055555481... (End)
Sum_{k >= 1} 1/a(k)^s = (1/2) * Sum_{n >= 1 odd numbers} moebius(n) * log((2*n*s)! * zeta(n*s) * abs(EulerE(n*s - 1)) / (Pi^(n*s) * 2^(2*n*s) * BernoulliB(2*n*s) * (2^(n*s) + 1) * (n*s - 1)!))/n, s >= 3 odd number. - Dimitris Valianatos, May 21 2020
Legendre symbol (-1, a(n)) = +1, for n >= 1. - Wolfdieter Lang, Mar 03 2021
Comments