A000215 Fermat numbers: a(n) = 2^(2^n) + 1.
3, 5, 17, 257, 65537, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937
Offset: 0
Examples
a(0) = 1*2^1 + 1 = 3 = 1*(2*1) + 1. a(1) = 1*2^2 + 1 = 5 = 1*(2*2) + 1. a(2) = 1*2^4 + 1 = 17 = 2*(2*4) + 1. a(3) = 1*2^8 + 1 = 257 = 16*(2*8) + 1. a(4) = 1*2^16 + 1 = 65537 = 2048*(2*16) + 1. a(5) = 1*2^32 + 1 = 4294967297 = 641*6700417 = (10*(2*32) + 1)*(104694*(2*32) + 1). a(6) = 1*2^64 + 1 = 18446744073709551617 = 274177*67280421310721 = (2142*(2*64) + 1)*(525628291490*(2*64) + 1).
References
- M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 2nd. ed., 2001; see p. 3.
- T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 7.
- P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 87.
- James Gleick, Faster, Vintage Books, NY, 2000 (see pp. 259-261).
- Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, pp. 78-79.
- R. K. Guy, Unsolved Problems in Number Theory, A3.
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 14.
- E. Hille, Analytic Function Theory, Vol. I, Chelsea, N.Y., see p. 64.
- T. Koshy, "The Digital Root Of A Fermat Number", Journal of Recreational Mathematics Vol. 32 No. 2 2002-3 Baywood NY.
- M. Krizek, F. Luca & L. Somer, 17 Lectures on Fermat Numbers, Springer-Verlag NY 2001.
- C. S. Ogilvy and J. T. Anderson, Excursions in Number Theory, Oxford University Press, NY, 1966, p. 36.
- Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see pp. 18, 59.
- C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 202.
- Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 6-7, 70-75.
- 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 136-137.
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1987, pp. 148-149.
Links
- N. J. A. Sloane, Table of n, a(n) for n = 0..11
- Richard Bellman, A note on relatively prime sequences, Bull. Amer. Math. Soc. 53 (1947), 778-779.
- Chris Bispels, Matthew Cohen, Joshua Harrington, Joshua Lowrance, Kaelyn Pontes, Leif Schaumann, and Tony W. H. Wong, A further investigation on covering systems with odd moduli, arXiv:2507.16135 [math.NT], 2025. See p. 3.
- Chris K. Caldwell, The Prime Glossary, Fermat number.
- Chris K. Caldwell, The prime pages All prime-square Mersenne divisors are Wieferich (2021).
- Shane Chern, Fermat Numbers in Multinomial Coefficients, J. Int. Seq. 17 (2014) # 14.3.2.
- Leonhard Euler, Observations on a theorem of Fermat and others on looking at prime numbers, arXiv:math/0501118 [math.HO], 2005-2008.
- Leonhard Euler, Observationes de theoremate quodam Fermatiano aliisque ad numeros primos spectantibus.
- Emmanuel Ferrand, Deformations of the Taylor Formula, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.7.
- Richard K. Guy, The strong law of small numbers. Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy]
- Christian Kassel and Christophe Reutenauer, Pairs of intertwined integer sequences, arXiv:2507.15780 [math.NT], 2025. See p. 12.
- Wilfrid Keller, Prime factors k.2^n + 1 of Fermat numbers F_m
- Jiří Klaška, Jakóbczyk's Hypothesis on Mersenne Numbers and Generalizations of Skula's Theorem, J. Int. Seq., Vol. 26 (2023), Article 23.3.8.
- T.-W. Leung, A Brief Introduction to Fermat Numbers
- Romeo Meštrović, Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof, arXiv preprint arXiv:1202.3670 [math.HO], 2012. - From _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.
- Michael A. Morrison and John Brillhart, The factorization of F_7, Bull. Amer. Math. Soc. 77 (1971), 264.
- Robert Munafo, Fermat Numbers
- Robert Munafo, Notes on Fermat numbers
- Seppo Mustonen, On integer sequences with mutual k-residues.
- Seppo Mustonen, On integer sequences with mutual k-residues. [Local copy]
- OEIS Wiki, Fermat numbers.
- OEIS Wiki, Sierpinski's triangle.
- G. A. Paxson, The compositeness of the thirteenth Fermat number, Math. Comp. 15 (76) (1961) 420-420.
- Carl Pomerance, A tale of two sieves, Notices Amer. Math. Soc., 43 (1996), 1473-1485.
- P. Sanchez, PlanetMath.org, Fermat Numbers
- 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.
- G. Villemin's Almanach of Numbers, Nombres de Fermat.
- Le Roy J. Warren, Henry G. Bray, On the square-freeness of Fermat and Mersenne Numbers, Pac. J. Math. 22 (3) (1967) 563.
- Eric Weisstein's World of Mathematics, Fermat Number.
- Eric Weisstein's World of Mathematics, Generalized Fermat Number.
- Wikipedia, Fermat number.
- Wolfram Research, Fermat numbers are pairwise coprime.
Crossrefs
Programs
-
Haskell
a000215 = (+ 1) . (2 ^) . (2 ^) -- Reinhard Zumkeller, Feb 13 2015
-
Maple
A000215 := n->2^(2^n)+1;
-
Mathematica
Table[2^(2^n) + 1, {n, 0, 8}] (* Alonso del Arte, Jun 07 2011 *)
-
Maxima
A000215(n):=2^(2^n)+1$ makelist(A000215(n),n,0,10); /* Martin Ettl, Dec 10 2012 */
-
PARI
a(n)=if(n<1,3*(n==0),(a(n-1)-1)^2+1)
-
Python
def a(n): return 2**(2**n) + 1 print([a(n) for n in range(9)]) # Michael S. Branicky, Apr 19 2021
Formula
a(0) = 3; a(n) = (a(n-1)-1)^2 + 1, n >= 1.
a(n) = a(n-1)*a(n-2)*...*a(1)*a(0) + 2, n >= 0, where for n = 0, we get the empty product, i.e., 1, plus 2, giving 3 = a(0). - Benoit Cloitre, Sep 15 2002 [edited by Daniel Forgues, Jun 20 2011]
The above formula implies that the Fermat numbers (being all odd) are coprime.
Conjecture: F is a Fermat prime if and only if phi(F-2) = (F-1)/2. - Benoit Cloitre, Sep 15 2002
A000120(a(n)) = 2. - Reinhard Zumkeller, Aug 07 2010
If a(n) is composite, then a(n) = A242619(n)^2 + A242620(n)^2 = A257916(n)^2 - A257917(n)^2. - Arkadiusz Wesolowski, May 13 2015
Sum_{n>=0} 1/a(n) = A051158. - Amiram Eldar, Oct 27 2020
From Amiram Eldar, Jan 28 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = A249119.
Product_{n>=0} (1 - 1/a(n)) = 1/2. (End)
a(n) = 2*A077585(n) + 3. - César Aguilera, Jul 26 2023
a(n) = 2*2^A000225(n) + 1. - César Aguilera, Jul 11 2024
Comments