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


(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A019434 Fermat primes: primes of the form 2^(2^k) + 1, for some k >= 0. 344
3, 5, 17, 257, 65537 (list; graph; refs; listen; history; text; internal format)



It is conjectured that there are only 5 terms. Currently it has been shown that 2^(2^k) + 1 is composite for 5 <= k <= 32 (see Eric Weisstein's Fermat Primes link). - Dmitry Kamenetsky, Sep 28 2008

No Fermat prime is a Brazilian number. So Fermat primes belong to A220627. For proof see Proposition 3 page 36 in "Les nombres brésiliens" in Links. - Bernard Schott, Dec 29 2012

This sequence and A001220 are disjoint (see "Other theorems about Fermat numbers" in Wikipedia link). - Felix Fröhlich, Sep 07 2014

Numbers n > 1 such that n * 2^(n-2) divides (n-1)! + 2^(n-1). - Thomas Ordowski, Jan 15 2015

From Jaroslav Krizek, Mar 17 2016: (Start)

Primes p such that phi(p) = 2*phi(p-1); primes from A171271.

Primes p such that sigma(p-1) = 2p - 3.

Primes p such that sigma(p-1) = 2*sigma(p) - 5.

For n > 1, a(n) = primes p such that p = 4 * phi((p-1) / 2) + 1.

Subsequence of A256444 and A256439.


1) primes p such that phi(p) = 2*phi(p-2).

2) primes p such that phi(p) = 2*phi(p-1) = 2*phi(p-2).

3) primes p such that p = sigma(phi(p-2)) + 2.

4) primes p such that phi(p-1) + 1 divides p + 1.

5) numbers n such that sigma(n-1) = 2*sigma(n) - 5. (End)

Odd primes p such that ratio of the form (the number of nonnegative m < p such that m^q == m (mod p))/(the number of nonnegative m < p such that -m^q == m (mod p)) is a divisor of p for all nonnegative q. - Juri-Stepan Gerasimov, Oct 13 2020

Numbers n such that tau(n)*(number of distinct ratio (the number of nonnegative m < n such that m^q == m (mod n))/(the number of nonnegative m < n such that -m^q == m (mod n))) for nonnegative q is equal to 4. - Juri-Stepan Gerasimov, Oct 22 2020

The numbers of primitive roots for the five known terms are 1, 2, 8, 128, 32768. - Gary W. Adamson, Jan 13 2022

Prime numbers such that every residue is either a primitive root or a quadratic residue. - Keith Backman, Jul 11 2022


G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.

C. F. Gauss, Disquisitiones Arithmeticae, Yale, 1965; see Table 1, p. 458.

R. K. Guy, Unsolved Problems in Number Theory, A3.

Hardy and Wright, An Introduction to the Theory of Numbers, bottom of page 18 in the sixth edition, gives an heuristic argument that this sequence is finite.


Table of n, a(n) for n=1..5.

Anas AbuDaqa, Amjad Abu-Hassan, and Muhammad Imam, Taxonomy and Practical Evaluation of Primality Testing Algorithms, arXiv:2006.08444 [cs.CR], 2020.

Cyril Banderier, Pepin's Criterion For Fermat Numbers (in French)

Kent D. Boklan and John H. Conway, Expect at most one billionth of a new Fermat Prime!, arXiv:1605.01371 [math.NT], 2016.

P. Bruillard, S.-H. Ng, E. Rowell, and Z. Wang, On modular categories, arXiv:1310.7050 [math.QA], 2013-2015.

C. K. Caldwell, The Prime Glossary, Fermat number

R. K. Guy, The strong law of small numbers. Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy]

Ernest G. Hibbs, Component Interactions of the Prime Numbers, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.

Wilfrid Keller, Prime factors k.2^n + 1 of Fermat numbers F_m

P. Mathonet, M. Rigo, M. Stipulanti and N. Zénaïdi, On digital sequences associated with Pascal's triangle, arXiv:2201.06636 [math.NT], 2022.

Romeo Mestrovic, Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof, arXiv:1202.3670 [math.HO], 2012. - N. J. A. Sloane, Jun 13 2012

Romeo Meštrović, Goldbach-type conjectures arising from some arithmetic progressions, University of Montenegro, 2018.

Romeo Meštrović, Goldbach's like conjectures arising from arithmetic progressions whose first two terms are primes, arXiv:1901.07882 [math.NT], 2019.

Salah Eddine Rihane, Chèfiath Awero Adegbindin, and Alain Togbé, Fermat Padovan And Perrin Numbers, J. Int. Seq., Vol. 23 (2020), Article 20.6.2.

Maxie D. Schmidt, New Congruences and Finite Difference Equations for Generalized Factorial Functions, arXiv:1701.04741 [math.CO], 2017.

Bernard Schott, Les nombres brésiliens, Quadrature, no. 76, avril-juin 2010, pages 30-38. Local copy, included here with permission from the editors of Quadrature.

Yaryna Stelmakh, Homeomorphisms of the space of non-zero integers with the Kirch topology, arXiv:2101.04676 [math.GN], 2020.

Eric Weisstein's World of Mathematics, Fermat Number

Eric Weisstein's World of Mathematics, Fermat Prime

Eric Weisstein's World of Mathematics, Pepin's Test

Wikipedia, Fermat number

Haifeng Xu, The largest cycles consist by the quadratic residues and Fermat primes, arXiv:1601.06509 [math.NT], 2016.


a(n+1) = A180024(A049084(a(n))). - Reinhard Zumkeller, Aug 08 2010

a(n) = 1 + A001146(n-1), if 1 <= n <= 5. - Omar E. Pol, Jun 08 2018


Select[Table[2^(2^n) + 1, {n, 0, 4}], PrimeQ] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)


(Magma) [2^(2^n)+1 : n in [0..4] | IsPrime(2^(2^n)+1)]; // Arkadiusz Wesolowski, Jun 09 2011

(PARI) for(i=0, 10, isprime(2^2^i+1) & print1(2^2^i+1, ", ")) \\ M. F. Hasler, Nov 21 2009

(Sage) [2^(2^n)+1 for n in (0..4) if is_prime(2^(2^n)+1)] # G. C. Greubel, Mar 07 2019


Cf. A000215, A001146, A159611, A220627, A220570.

Subsequence of A147545 and of A334101. Cf. also A333788, A334092.

Cf. A045544.

Sequence in context: A056130 A273871 A078726 * A164307 A125045 A093179

Adjacent sequences:  A019431 A019432 A019433 * A019435 A019436 A019437




N. J. A. Sloane, David W. Wilson



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 September 27 15:39 EDT 2022. Contains 357062 sequences. (Running on oeis4.)