cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 9093 results. Next

A000043 Mersenne exponents: primes p such that 2^p - 1 is prime. Then 2^p - 1 is called a Mersenne prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, 42643801, 43112609, 57885161, 74207281
Offset: 1

Views

Author

Keywords

Comments

Equivalently, integers k such that 2^k - 1 is prime.
It is believed (but unproved) that this sequence is infinite. The data suggest that the number of terms up to exponent N is roughly K log N for some constant K.
Length of prime repunits in base 2.
The associated perfect number N=2^(p-1)*M(p) (=A019279*A000668=A000396), has 2p (=A061645) divisors with harmonic mean p (and geometric mean sqrt(N)). - Lekraj Beedassy, Aug 21 2004
In one of his first publications Euler found the numbers up to 31 but erroneously included 41 and 47.
Equals number of bits in binary expansion of n-th Mersenne prime (A117293). - Artur Jasinski, Feb 09 2007
Number of divisors of n-th even perfect number, divided by 2. Number of divisors of n-th even perfect number that are powers of 2. Number of divisors of n-th even perfect number that are multiples of n-th Mersenne prime A000668(n). - Omar E. Pol, Feb 24 2008
Number of divisors of n-th even superperfect number A061652(n). Numbers of divisors of n-th superperfect number A019279(n), assuming there are no odd superperfect numbers. - Omar E. Pol, Mar 01 2008
Differences between exponents when the even perfect numbers are represented as differences of powers of 2, for example: The 5th even perfect number is 33550336 = 2^25 - 2^12 then a(5)=25-12=13 (see A135655, A133033, A090748). - Omar E. Pol, Mar 01 2008
Number of 1's in binary expansion of n-th even perfect number (see A135650). Number of 1's in binary expansion of divisors of n-th even perfect number that are multiples of n-th Mersenne prime A000668(n) (see A135652, A135653, A135654, A135655). - Omar E. Pol, May 04 2008
Indices of the numbers A006516 that are also even perfect numbers. - Omar E. Pol, Aug 30 2008
Indices of Mersenne numbers A000225 that are also Mersenne primes A000668. - Omar E. Pol, Aug 31 2008
The (prime) number p appears in this sequence if and only if there is no prime q<2^p-1 such that the order of 2 modulo q equals p; a special case is that if p=4k+3 is prime and also q=2p+1 is prime then the order of 2 modulo q is p so p is not a term of this sequence. - Joerg Arndt, Jan 16 2011
Primes p such that sigma(2^p) - sigma(2^p-1) = 2^p-1. - Jaroslav Krizek, Aug 02 2013
Integers k such that every degree k irreducible polynomial over GF(2) is also primitive, i.e., has order 2^k-1. Equivalently, the integers k such that A001037(k) = A011260(k). - Geoffrey Critzer, Dec 08 2019
Conjecture: for k > 1, 2^k-1 is (a Mersenne) prime or k = 2^(2^m)+1 (is a Fermat number) if and only if (k-1)^(2^k-2) == 1 (mod (2^k-1)k^2). - Thomas Ordowski, Oct 05 2023
Conjecture: for p prime, 2^p-1 is (a Mersenne) prime or p = 2^(2^m)+1 (is a Fermat number) if and only if (p-1)^(2^p-2) == 1 (mod 2^p-1). - David Barina, Nov 25 2024
Already as of Dec. 2020, all exponents up to 10^8 had been verified, implying that 74207281, 77232917 and 82589933 are indeed the next three terms. As of today, all exponents up to 130439863 have been tested at least once, see the GIMPS Milestones Report. - M. F. Hasler, Apr 11 2025
On June 23. 2025 all exponents up to 74340751 have been verified, confirming that 74207281 is the exponent of the 49th Mersenne Prime. - Rodolfo Ruiz-Huidobro, Jun 23 2025

Examples

			Corresponding to the initial terms 2, 3, 5, 7, 13, 17, 19, 31 ... we get the Mersenne primes 2^2 - 1 = 3, 2^3 - 1 = 7, 2^5 - 1 = 31, 127, 8191, 131071, 524287, 2147483647, ... (see A000668).
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 4.
  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, p. 79.
  • R. K. Guy, Unsolved Problems in Number Theory, Section A3.
  • F. Lemmermeyer, Reciprocity Laws From Euler to Eisenstein, Springer-Verlag, 2000, p. 57.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 19.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 47.
  • 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 132-134.
  • B. Tuckerman, The 24th Mersenne prime, Notices Amer. Math. Soc., 18 (Jun, 1971), Abstract 684-A15, p. 608.

Crossrefs

Cf. A000668 (Mersenne primes).
Cf. A028335 (integer lengths of Mersenne primes).
Cf. A000225 (Mersenne numbers).
Cf. A001348 (Mersenne numbers with n prime).

Programs

  • Mathematica
    MersennePrimeExponent[Range[48]] (* Eric W. Weisstein, Jul 17 2017; updated Oct 21 2024 *)
  • PARI
    isA000043(n) = isprime(2^n-1) \\ Michael B. Porter, Oct 28 2009
    
  • PARI
    is(n)=my(h=Mod(2,2^n-1)); for(i=1, n-2, h=2*h^2-1); h==0||n==2 \\ Lucas-Lehmer test for exponent e. - Joerg Arndt, Jan 16 2011, and Charles R Greathouse IV, Jun 05 2013
    forprime(e=2,5000,if(is(e),print1(e,", "))); /* terms < 5000 */
    
  • Python
    from sympy import isprime, prime
    for n in range(1,100):
        if isprime(2**prime(n)-1):
            print(prime(n), end=', ') # Stefano Spezia, Dec 06 2018

Formula

a(n) = log((1/2)*(1+sqrt(1+8*A000396(n))))/log(2). - Artur Jasinski, Sep 23 2008 (under the assumption there are no odd perfect numbers, Joerg Arndt, Feb 23 2014)
a(n) = A000005(A061652(n)). - Omar E. Pol, Aug 26 2009
a(n) = A000120(A000396(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Oct 30 2013

Extensions

Also in the sequence: p = 74207281. - Charles R Greathouse IV, Jan 19 2016
Also in the sequence: p = 77232917. - Eric W. Weisstein, Jan 03 2018
Also in the sequence: p = 82589933. - Gord Palameta, Dec 21 2018
a(46) = 42643801 and a(47) = 43112609, whose ordinal positions in the sequence are now confirmed, communicated by Eric W. Weisstein, Apr 12 2018
a(48) = 57885161, whose ordinal position in the sequence is now confirmed, communicated by Benjamin Przybocki, Jan 05 2022
Also in the sequence: p = 136279841. - Eric W. Weisstein, Oct 21 2024
As of Jan 31 2025, 48 terms are known, and are shown in the DATA section. Four additional numbers are known to be in the sequence, namely 74207281, 77232917, 82589933, and 136279841, but they may not be the next terms. See the GIMP website for the latest information. - N. J. A. Sloane, Jan 31 2025

A000668 Mersenne primes (primes of the form 2^n - 1).

Original entry on oeis.org

3, 7, 31, 127, 8191, 131071, 524287, 2147483647, 2305843009213693951, 618970019642690137449562111, 162259276829213363391578010288127, 170141183460469231731687303715884105727
Offset: 1

Views

Author

Keywords

Comments

For a Mersenne number 2^n - 1 to be prime, the exponent n must itself be prime.
See A000043 for the values of n.
Primes that are repunits in base 2.
Define f(k) = 2k+1; begin with k = 2, a(n+1) = least prime of the form f(f(f(...(a(n))))). - Amarnath Murthy, Dec 26 2003
Mersenne primes other than the first are of the form 6n+1. - Lekraj Beedassy, Aug 27 2004. Mersenne primes other than the first are of the form 24n+7; see also A124477. - Artur Jasinski, Nov 25 2007
A034876(a(n)) = 0 and A034876(a(n)+1) = 1. - Jonathan Sondow, Dec 19 2004
Mersenne primes are solutions to sigma(n+1)-sigma(n) = n as perfect numbers (A000396(n)) are solutions to sigma(n) = 2n. In fact, appears to give all n such that sigma(n+1)-sigma(n) = n. - Benoit Cloitre, Aug 27 2002
If n is in the sequence then sigma(sigma(n)) = 2n+1. Is it true that this sequence gives all numbers n such that sigma(sigma(n)) = 2n+1? - Farideh Firoozbakht, Aug 19 2005
It is easily proved that if n is a Mersenne prime then sigma(sigma(n)) - sigma(n) = n. Is it true that Mersenne primes are all the solutions of the equation sigma(sigma(x)) - sigma(x) = x? - Farideh Firoozbakht, Feb 12 2008
Sum of divisors of n-th even superperfect number A061652(n). Sum of divisors of n-th superperfect number A019279(n), if there are no odd superperfect numbers. - Omar E. Pol, Mar 11 2008
Indices of both triangular numbers and generalized hexagonal numbers (A000217) that are also even perfect numbers. - Omar E. Pol, May 10 2008, Sep 22 2013
Number of positive integers (1, 2, 3, ...) whose sum is the n-th perfect number A000396(n). - Omar E. Pol, May 10 2008
Vertex number where the n-th perfect number A000396(n) is located in the square spiral whose vertices are the positive triangular numbers A000217. - Omar E. Pol, May 10 2008
Mersenne numbers A000225 whose indices are the prime numbers A000043. - Omar E. Pol, Aug 31 2008
The digital roots are 1 if p == 1 (mod 6) and 4 if p == 5 (mod 6). [T. Koshy, Math Gaz. 89 (2005) p. 465]
Primes p such that for all primes q < p, p XOR q = p - q. - Brad Clardy, Oct 26 2011
All these primes, except 3, are Brazilian primes, so they are also in A085104 and A023195. - Bernard Schott, Dec 26 2012
All prime numbers p can be classified by k = (p mod 12) into four classes: k=1, 5, 7, 11. The Mersennne prime numbers 2^p-1, p > 2 are in the class k=7 with p=12*(n-1)+7, n=1,2,.... As all 2^p (p odd) are in class k=8 it follows that all 2^p-1, p > 2 are in class k=7. - Freimut Marschner, Jul 27 2013
From "The Guinness Book of Primes": "During the reign of Queen Elizabeth I, the largest known prime number was the number of grains of rice on the chessboard up to and including the nineteenth square: 524,287 [= 2^19 - 1]. By the time Lord Nelson was fighting the Battle of Trafalgar, the record for the largest prime had gone up to the thirty-first square of the chessboard: 2,147,483,647 [= 2^31 - 1]. This ten-digits number was proved to be prime in 1772 by the Swiss mathematician Leonard Euler, and it held the record until 1867." [du Sautoy] - Robert G. Wilson v, Nov 26 2013
If n is in the sequence then A024816(n) = antisigma(n) = antisigma(n+1) - 1. Is it true that this sequence gives all numbers n such that antisigma(n) = antisigma(n+1) - 1? Are there composite numbers with this property? - Jaroslav Krizek, Jan 24 2014
If n is in the sequence then phi(n) + sigma(sigma(n)) = 3n. Is it true that Mersenne primes are all the solutions of the equation phi(x) + sigma(sigma(x)) = 3x? - Farideh Firoozbakht, Sep 03 2014
a(5) = A229381(2) = 8191 is the "Simpsons' Mersenne prime". - Jonathan Sondow, Jan 02 2015
Equivalently, prime powers of the form 2^n - 1, see Theorem 2 in Lemos & Cambraia Junior. - Charles R Greathouse IV, Jul 07 2016
Primes whose sum of divisors is a power of 2. Primes p such that p + 1 is a power of 2. Primes in A046528. - Omar E. Pol, Jul 09 2016
From Jaroslav Krizek, Jan 19 2017: (Start)
Primes p such that sigma(p+1) = 2p+1.
Primes p such that A051027(p) = sigma(sigma(p)) = 2^k-1 for some k > 1.
Primes p of the form sigma(2^prime(n)-1)-1 for some n. Corresponding values of numbers n are in A016027.
Primes p of the form sigma(2^(n-1)) for some n > 1. Corresponding values of numbers n are in A000043 (Mersenne exponents).
Primes of the form sigma(2^(n+1)) for some n > 1. Corresponding values of numbers n are in A153798 (Mersenne exponents-2).
Primes p of the form sigma(n) where n is even; subsequence of A023195. Primes p of the form sigma(n) for some n. Conjecture: 31 is the only prime p such that p = sigma(x) = sigma(y) for distinct numbers x and y; 31 = sigma(16) = sigma(25).
Conjecture: numbers n such that n = sigma(sigma(n+1)-n-1)-1, i.e., A072868(n)-1.
Conjecture: primes of the form sigma(4*(n-1)) for some n. Corresponding values of numbers n are in A281312. (End)
[Conjecture] For n > 2, the Mersenne number M(n) = 2^n - 1 is a prime if and only if 3^M(n-1) == -1 (mod M(n)). - Thomas Ordowski, Aug 12 2018 [This needs proof! - Joerg Arndt, Mar 31 2019]
Named "Mersenne's numbers" by W. W. Rouse Ball (1892, 1912) after Marin Mersenne (1588-1648). - Amiram Eldar, Feb 20 2021
Theorem. Let b = 2^p - 1 (where p is a prime). Then b is a Mersenne prime iff (c = 2^p - 2 is totient or a term of A002202). Otherwise, if c is (nontotient or a term of A005277) then b is composite. Proof. Trivial, since, while b = v^g - 1 where v is even, v > 2, g is an integer, g > 1, b is always composite, and c = v^g - 2 is nontotient (or a term of A005277), and so is for any composite b = 2^g - 1 (in the last case, c = v^g - 2 is also nontotient, or a term of A005277). - Sergey Pavlov, Aug 30 2021 [Disclaimer: This proof has not been checked. - N. J. A. Sloane, Oct 01 2021]

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 4.
  • John Brillhart, D. H. Lehmer, J. L. Selfridge, Bryant Tuckerman and S. S. Wagstaff, Jr., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 135-136.
  • Graham Everest, Alf van der Poorten, Igor Shparlinski and Thomas Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 76.
  • Marcus P. F. du Sautoy, The Number Mysteries, A Mathematical Odyssey Through Everyday Life, Palgrave Macmillan, First published in 2010 by the Fourth Estate, an imprint of Harper Collins UK, 2011, p. 46. - Robert G. Wilson v, Nov 26 2013
  • 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).
  • Bryant Tuckerman, The 24th Mersenne prime, Notices Amer. Math. Soc., 18 (Jun, 1971), Abstract 684-A15, p. 608.

Crossrefs

Cf. A000225 (Mersenne numbers).
Cf. A000043 (Mersenne exponents).
Cf. A001348 (Mersenne numbers with n prime).

Programs

  • GAP
    A000668:=Filtered(List(Filtered([1..600], IsPrime),i->2^i-1),IsPrime); # Muniru A Asiru, Oct 01 2017
    
  • Maple
    A000668 := proc(n) local i;
    i := 2^(ithprime(n))-1:
    if (isprime(i)) then
       return i
    fi: end:
    seq(A000668(n), n=1..31); # Jani Melik, Feb 09 2011
    # Alternate:
    seq(numtheory:-mersenne([i]),i=1..26); # Robert Israel, Jul 13 2014
  • Mathematica
    2^Array[MersennePrimeExponent, 18] - 1 (* Jean-François Alcover, Feb 17 2018, Mersenne primes with less than 1000 digits *)
    2^MersennePrimeExponent[Range[18]] - 1 (* Eric W. Weisstein, Sep 04 2021 *)
  • PARI
    forprime(p=2,1e5,if(ispseudoprime(2^p-1),print1(2^p-1", "))) \\ Charles R Greathouse IV, Jul 15 2011
    
  • PARI
    LL(e) = my(n, h); n = 2^e-1; h = Mod(2, n); for (k=1, e-2, h=2*h*h-1); return(0==h) \\ after Joerg Arndt in A000043
    forprime(p=1, , if(LL(p), print1(p, ", "))) \\ Felix Fröhlich, Feb 17 2018
    
  • Python
    from sympy import isprime, primerange
    print([2**n-1 for n in primerange(1, 1001) if isprime(2**n-1)]) # Karl V. Keller, Jr., Jul 16 2020

Formula

a(n) = sigma(A061652(n)) = A000203(A061652(n)). - Omar E. Pol, Apr 15 2008
a(n) = sigma(A019279(n)) = A000203(A019279(n)), provided that there are no odd superperfect numbers. - Omar E. Pol, May 10 2008
a(n) = A000225(A000043(n)). - Omar E. Pol, Aug 31 2008
a(n) = 2^A000043(n) - 1 = 2^(A000005(A061652(n))) - 1. - Omar E. Pol, Oct 27 2011
a(n) = A000040(A059305(n)) = A001348(A016027(n)). - Omar E. Pol, Jun 29 2012
a(n) = A007947(A000396(n))/2, provided that there are no odd perfect numbers. - Omar E. Pol, Feb 01 2013
a(n) = 4*A134709(n) + 3. - Ivan N. Ianakiev, Sep 07 2013
a(n) = A003056(A000396(n)), provided that there are no odd perfect numbers. - Omar E. Pol, Dec 19 2016
Sum_{n>=1} 1/a(n) = A173898. - Amiram Eldar, Feb 20 2021

A056654 Numbers k such that 10*R_k + 3 is prime, where R_k is the repunit (A002275) of length k.

Original entry on oeis.org

0, 1, 2, 4, 8, 10, 23, 83, 220, 1313, 2951, 20015, 51053
Offset: 1

Views

Author

Robert G. Wilson v, Aug 09 2000

Keywords

Comments

Also numbers k such that (10^(k+1)+17)/9 is prime.
a(14) > 10^5. - Robert Price, Nov 01 2014

Examples

			8 is a term because 111111113 is a prime.
		

Crossrefs

Cf. A093011 (corresponding primes), A097683.

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 10*(10^n - 1)/9 + 3 ], Print[ n ] ], {n, 0, 1350} ]
  • PARI
    is(n)=ispseudoprime(10^n\9*10+3) \\ Charles R Greathouse IV, Nov 10 2021

Formula

a(n) = A097683(n+1) - 1. - Robert Price, Nov 01 2014

Extensions

a(11) (only a probable prime) from Rick L. Shepherd, Mar 14 2004
a(12)-a(13) derived from A097683 by Robert Price, Nov 01 2014

A019434 Fermat primes: primes of the form 2^(2^k) + 1, for some k >= 0.

Original entry on oeis.org

3, 5, 17, 257, 65537
Offset: 1

Views

Author

Keywords

Comments

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.
Conjectures:
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
If there are only 5 Fermat primes, then there are only 31 odd order groups which have a 2-group automorphism group. See the Miles Englezou link for a proof. - Miles Englezou, Mar 10 2025

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 137-141, 197.
  • 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.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, pp. 78-79.
  • Richard 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.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 7, 70.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 136-137.

Crossrefs

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

Programs

Formula

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

A007097 Primeth recurrence: a(n+1) = a(n)-th prime.

Original entry on oeis.org

1, 2, 3, 5, 11, 31, 127, 709, 5381, 52711, 648391, 9737333, 174440041, 3657500101, 88362852307, 2428095424619, 75063692618249, 2586559730396077, 98552043847093519, 4123221751654370051, 188272405179937051081, 9332039515881088707361, 499720579610303128776791, 28785866289100396890228041
Offset: 0

Views

Author

Keywords

Comments

A007097(n) = Min {k : A109301(k) = n} = the first k whose rote height is n, the level set leader or minimum inverse function corresponding to A109301. - Jon Awbrey, Jun 26 2005
Lubomir Alexandrov informs me that he studied this sequence in his 1965 notebook. - N. J. A. Sloane, May 23 2008
a(n) is the Matula-Goebel number of the rooted path tree on n+1 vertices. The Matula-Goebel number of a rooted tree can be defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m>=2 there corresponds the product of the Matula-Goebel numbers of the m branches of T. - Emeric Deutsch, Feb 18 2012
Conjecture: log(a(1))*log(a(2))*...*log(a(n)) ~ a(n). - Thomas Ordowski, Mar 26 2015

References

  • Lubomir Alexandrov, unpublished notes, circa 1960.
  • L. Longeri, Towards understanding nature and the aesthetics of prime numbers, https://www.longeri.org/prime/nature.html [Broken link, but leave the URL here for historical reasons]
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row 1 of array A114537.
Left edge of tree A227413, right edge of A246378.
Cf. A078442, A109082 (left inverses).
Subsequence of A245823.

Programs

  • GAP
    P:=Filtered([1..60000],IsPrime);;
    a:=[1];; for n in [2..10] do a[n]:=P[a[n-1]]; od; a; # Muniru A Asiru, Dec 22 2018
  • Haskell
    a007097 n = a007097_list !! n
    a007097_list = iterate a000040 1  -- Reinhard Zumkeller, Jul 14 2013
    
  • Maple
    seq((ithprime@@n)(1),n=0..10); # Peter Luschny, Oct 16 2012
  • Mathematica
    NestList[Prime@# &, 1, 16] (* Robert G. Wilson v, May 30 2006 *)
  • PARI
    print1(p=1);until(,print1(","p=prime(p)))  \\ M. F. Hasler, Oct 09 2011
    

Formula

A049084(a(n+1)) = a(n). - Reinhard Zumkeller, Jul 14 2013
a(n)/a(n-1) ~ log(a(n)) ~ prime(n). - Thomas Ordowski, Mar 26 2015
a(n) = prime^{[n]}(1), with the prime function prime(k) = A000040(k), with a(0) = 1. See the name and the programs. - Wolfdieter Lang, Apr 03 2018
Sum_{n>=1} 1/a(n) = A292667. - Amiram Eldar, Oct 15 2020

Extensions

a(15) corrected and a(16)-a(17) added by Paul Zimmermann
a(18)-a(19) found by David Baugh using a program by Xavier Gourdon and Andrey V. Kulsha, Oct 25 2007
a(20)-a(21) found by Andrey V. Kulsha using a program by Xavier Gourdon, Oct 02 2011
a(22) from Henri Lifchitz, Oct 14 2014
a(23) from David Baugh using Kim Walisch's primecount, May 16 2016

A006880 Number of primes < 10^n.

Original entry on oeis.org

0, 4, 25, 168, 1229, 9592, 78498, 664579, 5761455, 50847534, 455052511, 4118054813, 37607912018, 346065536839, 3204941750802, 29844570422669, 279238341033925, 2623557157654233, 24739954287740860, 234057667276344607, 2220819602560918840, 21127269486018731928, 201467286689315906290
Offset: 0

Views

Author

Keywords

Comments

Number of primes with at most n digits; or pi(10^n).
Partial sums of A006879. - Lekraj Beedassy, Jun 25 2004
Also omega( (10^n)! ), where omega(x): number of distinct prime divisors of x. - Cino Hilliard, Jul 04 2007
This sequence also gives a good approximation for the sum of primes less than 10^(n/2). This is evident from the fact that the number of primes less than 10^2n closely approximates the sum of primes less than 10^n. See link on Sum of Primes for the derivation. - Cino Hilliard, Jun 08 2008
It appears that (10^n)/log((n+3)!) is a lower bound close to a(n), see A025201. - Eric Desbiaux, Jul 20 2010, edited by M. F. Hasler, Dec 03 2018

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 143, 146.
  • Richard Crandall and Carl B. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; p. 11.
  • Keith Devlin, Mathematics: The New Golden Age, new and revised edition. New York: Columbia University Press (1993): p. 6, Table 1.
  • Marcus du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; p. 48.
  • Calvin T. Long, Elementary Introduction to Number Theory. Prentice-Hall, Englewood Cliffs, NJ, 1987, p. 77.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 179.
  • H. Riesel, "Prime numbers and computer methods for factorization," Progress in Mathematics, Vol. 57, Birkhauser, Boston, 1985, page 38.
  • D. Shanks, Solved and Unsolved Problems in Number Theory. Chelsea, NY, 2nd edition, 1978, p. 15.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 455052511 at p. 190.

Crossrefs

Programs

Formula

a(n) = A000720(10^n). - M. F. Hasler, Dec 03 2018
Limit_{n->oo} a(n)/a(n-1) = 10. - Stefano Spezia, Aug 31 2025

Extensions

Lehmer gave the incorrect value 455052512 for the 10th term. More terms May 1996. Jud McCranie points out that the 11th term is not 4188054813 but rather 4118054813.
a(22) from Robert G. Wilson v, Sep 04 2001
a(23) (see Gourdon and Sebah) has yet to be verified and the assumed error is +-1. - Robert G. Wilson v, Jul 10 2002 [The actual error was 14037804. - N. J. A. Sloane, Nov 28 2007]
a(23) corrected by N. J. A. Sloane from the web page of Tomás Oliveira e Silva, Nov 28 2007
a(25) from J. Buethe, J. Franke, A. Jost, T. Kleinjung, Jun 01 2013, who said: "We have calculated pi(10^25) = 176846309399143769411680 unconditionally, using an analytic method based on Weil's explicit formula".
a(26) from Douglas B. Staple, Dec 02 2014
a(27) in the b-file from David Baugh and Kim Walisch via Charles R Greathouse IV, Jun 01 2016
a(28) in the b-file from David Baugh and Kim Walisch, Oct 26 2020
a(29) in the b-file from David Baugh and Kim Walisch, Feb 28 2022

A000105 Number of free polyominoes (or square animals) with n cells.

Original entry on oeis.org

1, 1, 1, 2, 5, 12, 35, 108, 369, 1285, 4655, 17073, 63600, 238591, 901971, 3426576, 13079255, 50107909, 192622052, 742624232, 2870671950, 11123060678, 43191857688, 168047007728, 654999700403, 2557227044764, 9999088822075, 39153010938487, 153511100594603
Offset: 0

Views

Author

Keywords

Comments

For n>0, a(n) + A030228(n) = A000988(n) because the number of free polyominoes plus the number of polyominoes lacking bilateral symmetry equals the number of one-sided polyominoes. - Graeme McRae, Jan 05 2006
The possible symmetry groups of a (nonempty) polyomino are the 10 subgroups of the dihedral group D_8 of order 8: D_8, 1, Z_2 (five times), Z_4, (Z_2)^2 (twice). - Benoit Jubin, Dec 30 2008
Names for first few polyominoes: monomino, domino, tromino, tetromino, pentomino, hexomino, heptomino, octomino, enneomino, decomino, hendecomino, dodecomino, ...
Limit_{n->oo} a(n)^(1/n) = mu with 3.98 < mu < 4.64 (quoted by Castiglione et al., with a reference to Barequet et al., 2006, for the lower bound). The upper bound is due to Klarner and Rivest, 1973. By Madras, 1999, it is now known that this limit, also known as Klarner's constant, is equal to the limit growth rate lim_{n->oo} a(n+1)/a(n).
Polyominoes are worth exploring in the elementary school classroom. Students in grade 2 can reproduce the first 6 terms. Grade 3 students can explore area and perimeter. Grade 4 students can talk about polyomino symmetries.
The pentominoes should be singled out for special attention: 1) they offer a nice, manageable set that a teacher can commercially acquire without too much expense. 2) There are also deeply strategic games and perplexing puzzles that are great for all students. 3) A fraction of students will become engaged because of the beautiful solutions.
Conjecture: Almost all polyominoes are holey. In other words, A000104(n)/a(n) tends to 0 for increasing n. - John Mason, Dec 11 2021 (This is true, a consequence of Madras's 1999 pattern theorem. - Johann Peters, Jan 06 2024)

Examples

			a(0) = 1 as there is 1 empty polyomino with #cells = 0. - _Fred Lunnon_, Jun 24 2020
		

References

  • S. W. Golomb, Polyominoes, Appendix D, p. 152; Princeton Univ. Pr. NJ 1994
  • J. E. Goodman and J. O'Rourke, editors, Handbook of Discrete and Computational Geometry, CRC Press, 1997, p. 229.
  • D. A. Klarner, The Mathematical Gardner, p. 252 Wadsworth Int. CA 1981
  • W. F. Lunnon, Counting polyominoes, pp. 347-372 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.
  • W. F. Lunnon, Counting hexagonal and triangular polyominoes, pp. 87-100 of R. C. Read, editor, Graph Theory and Computing. Academic Press, NY, 1972.
  • George E. Martin, Polyominoes - A Guide to Puzzles and Problems in Tiling, The Mathematical Association of America, 1996
  • Ed Pegg, Jr., Polyform puzzles, in Tribute to a Mathemagician, Peters, 2005, pp. 119-125.
  • R. C. Read, Some applications of computers in graph theory, in L. W. Beineke and R. J. Wilson, editors, Selected Topics in Graph Theory, Academic Press, NY, 1978, pp. 417-444.
  • 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).

Crossrefs

Sequences classifying polyominoes by symmetry group: A006746, A006747, A006748, A006749, A056877, A056878, A142886, A144553, A144554.
Cf. A001168 (not reduced by D_8 symmetry), A000104 (no holes), A054359, A054360, A001419, A000988, A030228 (chiral polyominoes).
See A006765 for another version.
Cf. also A000577, A000228, A103465, A210996 (bisection).
Excluding a(0), 8th and 9th row of A366766.

Programs

  • Mathematica
    (* In this program by Jaime Rangel-Mondragón, polyominoes are represented as a list of Gaussian integers. *)
    polyominoQ[p_List] := And @@ ((IntegerQ[Re[#]] && IntegerQ[Im[#]])& /@ p);
    rot[p_?polyominoQ] := I*p;
    ref[p_?polyominoQ] := (# - 2 Re[#])& /@ p;
    cyclic[p_] := Module[{i = p, ans = {p}}, While[(i = rot[i]) != p, AppendTo[ans, i]]; ans];
    dihedral[p_?polyominoQ] := Flatten[{#, ref[#]}& /@ cyclic[p], 1];
    canonical[p_?polyominoQ] := Union[(# - (Min[Re[p]] + Min[Im[p]]*I))& /@ p];
    allPieces[p_] := Union[canonical /@ dihedral[p]];
    polyominoes[1] = {{0}};
    polyominoes[n_] := polyominoes[n] = Module[{f, fig, ans = {}}, fig = ((f = #1; ({f, #1 + 1, f, #1 + I, f, #1 - 1, f, #1 - I}&) /@ f)&) /@ polyominoes[n - 1]; fig = Partition[Flatten[fig], n]; f = Select[Union[canonical /@ fig], Length[#1] == n &]; While[f != {}, ans = {ans, First[f]}; f = Complement[f, allPieces[First[f]]]]; Partition[Flatten[ans], n]];
    a[n_] := a[n] = Length[ polyominoes[n]];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 12}] (* Jean-François Alcover, Mar 24 2015, after Jaime Rangel-Mondragón *)

Formula

a(n) = A000104(n) + A001419(n). - R. J. Mathar, Jun 15 2014
a(n) = A006749(n) + A006746(n) + A006748(n) + A006747(n) + A056877(n) + A056878(n) + A144553(n) + A142886(n). - Andrew Howroyd, Dec 04 2018
a(n) = A259087(n) + A259088(n). - R. J. Mathar, May 22 2019
a(n) = (4*A006746(n) + 4*A006748(n) + 4*A006747(n) + 6*A056877(n) + 6*A056878(n) + 6*A144553(n) + 7*A142886(n) + A001168(n))/8. - John Mason, Nov 14 2021

Extensions

Extended to n=28 by Tomás Oliveira e Silva
Link updated by William Rex Marshall, Dec 16 2009
Edited by Gill Barequet, May 24 2011
Misspelling "polyominos" corrected by Don Knuth, May 03 2016
a(29)-a(45), a(47) from Toshihiro Shirakawa
a(46) calculated using values from A001168 (I. Jensen), A006748/A056877/A056878/A144553/A142886 (Robert A. Russell) and A006746/A006747 (John Mason), Nov 14 2021

A001220 Wieferich primes: primes p such that p^2 divides 2^(p-1) - 1.

Original entry on oeis.org

1093, 3511
Offset: 1

Views

Author

Keywords

Comments

Sequence is believed to be infinite.
Joseph Silverman showed that the abc-conjecture implies that there are infinitely many primes which are not in the sequence. - Benoit Cloitre, Jan 09 2003
Graves and Murty (2013) improved Silverman's result by showing that for any fixed k > 1, the abc-conjecture implies that there are infinitely many primes == 1 (mod k) which are not in the sequence. - Jonathan Sondow, Jan 21 2013
The squares of these numbers are Fermat pseudoprimes to base 2 (A001567) and Catalan pseudoprimes (A163209). - T. D. Noe, May 22 2003
Primes p that divide the numerator of the harmonic number H((p-1)/2); that is, p divides A001008((p-1)/2). - T. D. Noe, Mar 31 2004
In a 1977 paper, Wells Johnson, citing a suggestion from Lawrence Washington, pointed out the repetitions in the binary representations of the numbers which are one less than the two known Wieferich primes; i.e., 1092 = 10001000100 (base 2); 3510 = 110110110110 (base 2). It is perhaps worth remarking that 1092 = 444 (base 16) and 3510 = 6666 (base 8), so that these numbers are small multiples of repunits in the respective bases. Whether this is mathematically significant does not appear to be known. - John Blythe Dobson, Sep 29 2007
A002326((a(n)^2 - 1)/2) = A002326((a(n)-1)/2). - Vladimir Shevelev, Jul 09 2008, Aug 24 2008
It is believed that p^2 does not divide 3^(p-1) - 1 if p = a(n). This is true for n = 1 and 2. See A178815, A178844, A178900, and Ostafe-Shparlinski (2010) Section 1.1. - Jonathan Sondow, Jun 29 2010
These primes also divide the numerator of the harmonic number H(floor((p-1)/4)). - H. Eskandari (hamid.r.eskandari(AT)gmail.com), Sep 28 2010
1093 and 3511 are prime numbers p satisfying congruence 429327^(p-1) == 1 (mod p^2). Why? - Arkadiusz Wesolowski, Apr 07 2011. Such bases are listed in A247208. - Max Alekseyev, Nov 25 2014. See A269798 for all such bases, prime and composite, that are not powers of 2. - Felix Fröhlich, Apr 07 2018
A196202(A049084(a(1))) = A196202(A049084(a(2))) = 1. - Reinhard Zumkeller, Sep 29 2011
If q is prime and q^2 divides a prime-exponent Mersenne number, then q must be a Wieferich prime. Neither of the two known Wieferich primes divide Mersenne numbers. See Will Edgington's Mersenne page in the links below. - Daran Gill, Apr 04 2013
There are no other terms below 4.97*10^17 as established by PrimeGrid (see link below). - Max Alekseyev, Nov 20 2015. The search was done via PrimeGrid's PRPNet and the results were not double-checked. Because of the unreliability of the testing, the search was suspended in May 2017 (cf. Goetz, 2017). - Felix Fröhlich, Apr 01 2018. On Nov 28 2020, PrimeGrid has resumed the search (cf. Reggie, 2020). - Felix Fröhlich, Nov 29 2020. As of Dec 29 2022, PrimeGrid has completed the search to 2^64 (about 1.8 * 10^19) and has no plans to continue further. - Charles R Greathouse IV, Sep 24 2024
Are there other primes q >= p such that q^2 divides 2^(p-1)-1, where p is a prime? - Thomas Ordowski, Nov 22 2014. Any such q must be a Wieferich prime. - Max Alekseyev, Nov 25 2014
Primes p such that p^2 divides 2^r - 1 for some r, 0 < r < p. - Thomas Ordowski, Nov 28 2014, corrected by Max Alekseyev, Nov 28 2014
For some reason, both p=a(1) and p=a(2) also have more bases b with 1 < b < p that make b^(p-1) == 1 (mod p^2) than any smaller prime p; in other words, a(1) and a(2) belong to A248865. - Jeppe Stig Nielsen, Jul 28 2015
Let r_1, r_2, r_3, ..., r_i be the set of roots of the polynomial X^((p-1)/2) - (p-3)! * X^((p-3)/2) - (p-5)! * X^((p-5)/2) - ... - 1. Then p is a Wieferich prime iff p divides sum{k=1, p}(r_k^((p-1)/2)) (see Example 2 in Jakubec, 1994). - Felix Fröhlich, May 27 2016
Arthur Wieferich showed that if p is not a term of this sequence, then the First Case of Fermat's Last Theorem has no solution in x, y and z for prime exponent p (cf. Wieferich, 1909). - Felix Fröhlich, May 27 2016
Let U_n(P, Q) be a Lucas sequence of the first kind, let e be the Legendre symbol (D/p) and let p be a prime not dividing 2QD, where D = P^2 - 4*Q. Then a prime p such that U_(p-e) == 0 (mod p^2) is called a "Lucas-Wieferich prime associated to the pair (P, Q)". Wieferich primes are those Lucas-Wieferich primes that are associated to the pair (3, 2) (cf. McIntosh, Roettger, 2007, p. 2088). - Felix Fröhlich, May 27 2016
Any repeated prime factor of a term of A000215 is a term of this sequence. Thus, if there exist infinitely many Fermat numbers that are not squarefree, then this sequence is infinite, since no two Fermat numbers share a common factor. - Felix Fröhlich, May 27 2016
If the Diophantine equation p^x - 2^y = d has more than one solution in positive integers (x, y), with (p, d) not being one of the pairs (3, 1), (3, -5), (3, -13) or (5, -3), then p is a term of this sequence (cf. Scott, Styer, 2004, Corollary to Theorem 2). - Felix Fröhlich, Jun 18 2016
Odd primes p such that Chi_(D_0)(p) != 1 and Lambda_p(Q(sqrt(D_0))) != 1, where D_0 < 0 is the fundamental discriminant of the imaginary quadratic field Q(sqrt(1-p^2)) and Chi and Lambda are Iwasawa invariants (cf. Byeon, 2006, Proposition 1 (i)). - Felix Fröhlich, Jun 25 2016
If q is an odd prime, k, p are primes with p = 2*k+1, k == 3 (mod 4), p == -1 (mod q) and p =/= -1 (mod q^3) (Jakubec, 1998, Corollary 2 gives p == -5 (mod q) and p =/= -5 (mod q^3)) with the multiplicative order of q modulo k = (k-1)/2 and q dividing the class number of the real cyclotomic field Q(Zeta_p + (Zeta_p)^(-1)), then q is a term of this sequence (cf. Jakubec, 1995, Theorem 1). - Felix Fröhlich, Jun 25 2016
From Felix Fröhlich, Aug 06 2016: (Start)
Primes p such that p-1 is in A240719.
Prime terms of A077816 (cf. Agoh, Dilcher, Skula, 1997, Corollary 5.9).
p = prime(n) is in the sequence iff T(2, n) > 1, where T = A258045.
p = prime(n) is in the sequence iff an integer k exists such that T(n, k) = 2, where T = A258787. (End)
Conjecture: an integer n > 1 such that n^2 divides 2^(n-1)-1 must be a Wieferich prime. - Thomas Ordowski, Dec 21 2016
The above conjecture is equivalent to the statement that no "Wieferich pseudoprimes" (WPSPs) exist. While base-b WPSPs are known to exist for several bases b > 1 other than 2 (see for example A244752), no base-2 WPSPs are known. Since two necessary conditions for a composite to be a base-2 WPSP are that, both, it is a base-2 Fermat pseudoprime (A001567) and all its prime factors are Wieferich primes (cf. A270833), as shown in the comments in A240719, it seems that the first base-2 WPSP, if it exists, is probably very large. This appears to be supported by the guess that the properties of a composite to be a term of A001567 and of A270833 are "independent" of each other and by the observation that the scatterplot of A256517 seems to become "less dense" at the x-axis parallel line y = 2 for increasing n. It has been suggested in the literature that there could be asymptotically about log(log(x)) Wieferich primes below some number x, which is a function that grows to infinity, but does so very slowly. Considering the above constraints, the number of WPSPs may grow even more slowly, suggesting any such number, should it exist, probably lies far beyond any bound a brute-force search could reach in the forseeable future. Therefore I guess that the conjecture may be false, but a disproof or the discovery of a counterexample are probably extraordinarily difficult problems. - Felix Fröhlich, Jan 18 2019
Named after the German mathematician Arthur Josef Alwin Wieferich (1884-1954). a(1) = 1093 was found by Waldemar Meissner in 1913. a(2) = 3511 was found by N. G. W. H. Beeger in 1922. - Amiram Eldar, Jun 05 2021
From Jianing Song, Jun 21 2025: (Start)
The ring of integers of Q(2^(1/k)) is Z[2^(1/k)] if and only if k does not have a prime factor in this sequence (k is in A342390). See Theorem 5.3 of the paper of Keith Conrad. For example, we have:
(1 + 2^(364/1093) + 2^(2*364/1093) + ... + 2^(1092*364/1093))/1093 is an algebraic integer, but it is not in Z[2^(1/1093)];
(1 + 2^(1755/3511) + 2^(2*1755/3511) + ... + 2^(3510*1755/3511))/3511 is an algebraic integer, but it is not in Z[2^(1/3511)]. (End)

References

  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 28.
  • Richard K. Guy, Unsolved Problems in Number Theory, A3.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 91.
  • Yves Hellegouarch, "Invitation aux mathématiques de Fermat Wiles", Dunod, 2eme Edition, pp. 340-341.
  • Pace Nielsen, Wieferich primes, heuristics, computations, Abstracts Amer. Math. Soc., 33 (#1, 20912), #1077-11-48.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 263.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 230-234.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, NY, 1986, p. 163.

Crossrefs

Cf. similar primes related to the first case of Fermat's last theorem: A007540, A088164.
Sequences "primes p such that p^2 divides X^(p-1)-1": A014127 (X=3), A123692 (X=5), A212583 (X=6), A123693 (X=7), A045616 (X=10), A111027 (X=12), A128667 (X=13), A234810 (X=14), A242741 (X=15), A128668 (X=17), A244260 (X=18), A090968 (X=19), A242982 (X=20), A298951 (X=22), A128669 (X=23), A306255 (X=26), A306256 (X=30).

Programs

  • GAP
    Filtered([1..50000],p->IsPrime(p) and (2^(p-1)-1) mod p^2 =0); # Muniru A Asiru, Apr 03 2018
    
  • Haskell
    import Data.List (elemIndices)
    a001220 n = a001220_list !! (n-1)
    a001220_list = map (a000040 . (+ 1)) $ elemIndices 1 a196202_list
    -- Reinhard Zumkeller, Sep 29 2011
    
  • Magma
    [p : p in PrimesUpTo(310000) | IsZero((2^(p-1) - 1) mod (p^2))]; // Vincenzo Librandi, Jan 19 2019
  • Maple
    wieferich := proc (n) local nsq, remain, bin, char: if (not isprime(n)) then RETURN("not prime") fi: nsq := n^2: remain := 2: bin := convert(convert(n-1, binary),string): remain := (remain * 2) mod nsq: bin := substring(bin,2..length(bin)): while (length(bin) > 1) do: char := substring(bin,1..1): if char = "1" then remain := (remain * 2) mod nsq fi: remain := (remain^2) mod nsq: bin := substring(bin,2..length(bin)): od: if (bin = "1") then remain := (remain * 2) mod nsq fi: if remain = 1 then RETURN ("Wieferich prime") fi: RETURN ("non-Wieferich prime"): end: # Ulrich Schimke (ulrschimke(AT)aol.com), Nov 01 2001
  • Mathematica
    Select[Prime[Range[50000]],Divisible[2^(#-1)-1,#^2]&]  (* Harvey P. Dale, Apr 23 2011 *)
    Select[Prime[Range[50000]],PowerMod[2,#-1,#^2]==1&] (* Harvey P. Dale, May 25 2016 *)
  • PARI
    N=10^4; default(primelimit,N);
    forprime(n=2,N,if(Mod(2,n^2)^(n-1)==1,print1(n,", ")));
    \\ Joerg Arndt, May 01 2013
    
  • Python
    from sympy import prime
    from gmpy2 import powmod
    A001220_list = [p for p in (prime(n) for n in range(1,10**7)) if powmod(2,p-1,p*p) == 1]
    # Chai Wah Wu, Dec 03 2014
    

Formula

(A178815(A000720(p))^(p-1) - 1) mod p^2 = A178900(n), where p = a(n). - Jonathan Sondow, Jun 29 2010
Odd primes p such that A002326((p^2-1)/2) = A002326((p-1)/2). See A182297. - Thomas Ordowski, Feb 04 2014

A000001 Number of groups of order n.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2
Offset: 0

Views

Author

Keywords

Comments

Also, number of nonisomorphic subgroups of order n in symmetric group S_n. - Lekraj Beedassy, Dec 16 2004
Also, number of nonisomorphic primitives (antiderivatives) of the combinatorial species Lin[n-1], or X^{n-1}; see Rajan, Summary item (i). - Nicolae Boicu, Apr 29 2011
In (J. H. Conway, Heiko Dietrich and E. A. O'Brien, 2008), a(n) is called the "group number of n", denoted by gnu(n), and the first occurrence of k is called the "minimal order attaining k", denoted by moa(k) (see A046057). - Daniel Forgues, Feb 15 2017
It is conjectured in (J. H. Conway, Heiko Dietrich and E. A. O'Brien, 2008) that the sequence n -> a(n) -> a(a(n)) = a^2(n) -> a(a(a(n))) = a^3(n) -> ... -> consists ultimately of 1s, where a(n), denoted by gnu(n), is called the "group number of n". - Muniru A Asiru, Nov 19 2017
MacHale (2020) shows that there are infinitely many values of n for which there are more groups than rings of that order (cf. A027623). He gives n = 36355 as an example. It would be nice to have enough values of n to create an OEIS entry for them. - N. J. A. Sloane, Jan 02 2021
I conjecture that a(i) * a(j) <= a(i*j) for all nonnegative integers i and j. - Jorge R. F. F. Lopes, Apr 21 2024

Examples

			Groups of orders 1 through 10 (C_n = cyclic, D_n = dihedral of order n, Q_8 = quaternion, S_n = symmetric):
1: C_1
2: C_2
3: C_3
4: C_4, C_2 X C_2
5: C_5
6: C_6, S_3=D_6
7: C_7
8: C_8, C_4 X C_2, C_2 X C_2 X C_2, D_8, Q_8
9: C_9, C_3 X C_3
10: C_10, D_10
		

References

  • S. R. Blackburn, P. M. Neumann, and G. Venkataraman, Enumeration of Finite Groups, Cambridge, 2007.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 302, #35.
  • J. H. Conway et al., The Symmetries of Things, Peters, 2008, p. 209.
  • H. S. M. Coxeter and W. O. J. Moser, Generators and Relations for Discrete Groups, 4th ed., Springer-Verlag, NY, reprinted 1984, p. 134.
  • CRC Standard Mathematical Tables and Formulae, 30th ed. 1996, p. 150.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, A Foundation for Computer Science, Addison-Wesley Publ. Co., Reading, MA, 1989, Section 6.6 'Fibonacci Numbers' pp. 281-283.
  • M. Hall, Jr. and J. K. Senior, The Groups of Order 2^n (n <= 6). Macmillan, NY, 1964.
  • D. Joyner, 'Adventures in Group Theory', Johns Hopkins Press. Pp. 169-172 has table of groups of orders < 26.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section XIII.24, p. 481.
  • M. F. Newman and E. A. O'Brien, A CAYLEY library for the groups of order dividing 128. Group theory (Singapore, 1987), 437-442, de Gruyter, Berlin-New York, 1989.
  • 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).

Crossrefs

The main sequences concerned with group theory are A000001 (this one), A000679, A001034, A001228, A005180, A000019, A000637, A000638, A002106, A005432, A000688, A060689, A051532.
A003277 gives n for which A000001(n) = 1, A063756 (partial sums).
A046057 gives first occurrence of each k.
A027623 gives the number of rings of order n.

Programs

  • GAP
    A000001 := Concatenation([0], List([1..500], n -> NumberSmallGroups(n))); # Muniru A Asiru, Oct 15 2017
  • Magma
    D:=SmallGroupDatabase(); [ NumberOfSmallGroups(D, n) : n in [1..1000] ]; // John Cannon, Dec 23 2006
    
  • Maple
    GroupTheory:-NumGroups(n); # with(GroupTheory); loads this command - N. J. A. Sloane, Dec 28 2017
  • Mathematica
    FiniteGroupCount[Range[100]] (* Harvey P. Dale, Jan 29 2013 *)
    a[ n_] := If[ n < 1, 0, FiniteGroupCount @ n]; (* Michael Somos, May 28 2014 *)

Formula

From Mitch Harris, Oct 25 2006: (Start)
For p, q, r primes:
a(p) = 1, a(p^2) = 2, a(p^3) = 5, a(p^4) = 14, if p = 2, otherwise 15.
a(p^5) = 61 + 2*p + 2*gcd(p-1,3) + gcd(p-1,4), p >= 5, a(2^5)=51, a(3^5)=67.
a(p^e) ~ p^((2/27)e^3 + O(e^(8/3))).
a(p*q) = 1 if gcd(p,q-1) = 1, 2 if gcd(p,q-1) = p. (p < q)
a(p*q^2) is one of the following:
---------------------------------------------------------------------------
| a(p*q^2) | p*q^2 of the form | Sequences (p*q^2) |
---------- ------------------------------------------ ---------------------
| (p+9)/2 | q == 1 (mod p), p odd | A350638 |
| 5 | p=3, q=2 => p*q^2 = 12 |Special case with A_4|
| 5 | p=2, q odd | A143928 |
| 5 | p == 1 (mod q^2) | A350115 |
| 4 | p == 1 (mod q), p > 3, p !== 1 (mod q^2) | A349495 |
| 3 | q == -1 (mod p), p and q odd | A350245 |
| 2 | q !== +-1 (mod p) and p !== 1 (mod q) | A350422 |
---------------------------------------------------------------------------
[Table from Bernard Schott, Jan 18 2022]
a(p*q*r) (p < q < r) is one of the following:
q == 1 (mod p) r == 1 (mod p) r == 1 (mod q) a(p*q*r)
-------------- -------------- -------------- --------
No No No 1
No No Yes 2
No Yes No 2
No Yes Yes 4
Yes No No 2
Yes No Yes 3
Yes Yes No p+2
Yes Yes Yes p+4
[table from Derek Holt].
(End)
a(n) = A000688(n) + A060689(n). - R. J. Mathar, Mar 14 2015

Extensions

More terms from Michael Somos
Typo in b-file description fixed by David Applegate, Sep 05 2009

A006126 Number of hierarchical models on n labeled factors or variables with linear terms forced. Also number of antichain covers of a labeled n-set.

Original entry on oeis.org

2, 1, 2, 9, 114, 6894, 7785062, 2414627396434, 56130437209370320359966, 286386577668298410623295216696338374471993
Offset: 0

Views

Author

Keywords

Comments

An antichain cover is a cover such that no element of the cover is a subset of another element of the cover.
Also, the number of nondegenerate monotone Boolean functions of n variables in an n-variable Boolean algebra. - Rodrigo A. Obando (R.Obando(AT)computer.org), Jul 26 2004
Also, number of simplicial complexes on an n-element vertex set. - Richard Stanley, Feb 10 2019
There are two antichains of size zero, namely {} and {{}}, while there is only one simplicial complex, namely {}. The unlabeled case is A006602. The non-covering case is A000372, which is A014466 plus 1. - Gus Wiseman, Mar 31 2019
From Petros Hadjicostas, Apr 10 2020: (Start)
Hierarchical models are always nonempty because they always include an intercept (or overall effect).
The total number of log-linear hierarchical models on n labeled factors (categorical variables) with no forcing of terms is given by A000372(n) - 1 (Dedekind numbers minus 1).
Hierarchical log-linear models for analyzing contingency tables are defined in the classic book by Bishop, Fienberg, and Holland (1975). (End)

Examples

			a(5) = 1 + 90 + 790 + 1895 + 2116 + 1375 + 490 + 115 + 20 + 2 = 6894.
There are 9 antichain covers of a labeled 3-set: {{1,2,3}}, {{1},{2,3}}, {{2},{1,3}}, {{3},{1,2}}, {{1,2},{1,3}}, {{1,2},{2,3}}, {{1,3},{2,3}}, {{1},{2},{3}}, {{1,2},{1,3},{2,3}}.
From _Gus Wiseman_, Feb 23 2019: (Start)
The a(0) = 2 through a(3) = 9 antichains:
  {}    {{1}}  {{12}}    {{123}}
  {{}}         {{1}{2}}  {{1}{23}}
                         {{2}{13}}
                         {{3}{12}}
                         {{12}{13}}
                         {{12}{23}}
                         {{13}{23}}
                         {{1}{2}{3}}
                         {{12}{13}{23}}
(End)
		

References

  • Y. M. M. Bishop, S. E. Fienberg and P. W. Holland, Discrete Multivariate Analysis. MIT Press, 1975, p. 34. [In part (e), the Hierarchy Principle for log-linear models is defined. It essentially says that if a higher-order parameter term is included in the log-linear model, then all the lower-order parameter terms should also be included. - Petros Hadjicostas, Apr 08 2020]
  • V. Jovovic and G. Kilibarda, On enumeration of the class of all monotone Boolean functions, in preparation.
  • C. L. Mallows, personal communication.
  • A. A. Mcintosh, personal communication.
  • R. A. Obando, On the number of nondegenerate monotone boolean functions of n variables, In Preparation.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    nn=4;
    stableSets[u_,Q_]:=If[Length[u]===0,{{}},With[{w=First[u]},Join[stableSets[DeleteCases[u,w],Q],Prepend[#,w]&/@stableSets[DeleteCases[u,r_/;r===w||Q[r,w]||Q[w,r]],Q]]]];
    Table[Length[Select[stableSets[Subsets[Range[n]],SubsetQ],Union@@#==Range[n]&]],{n,0,nn}] (* Gus Wiseman, Feb 23 2019 *)
    A000372 = Cases[Import["https://oeis.org/A000372/b000372.txt", "Table"], {, }][[All, 2]];
    lg = Length[A000372];
    a372[n_] := If[0 <= n <= lg-1, A000372[[n+1]], 0];
    a[n_] := Sum[(-1)^(n-k+1) Binomial[n, k-1] a372[k-1], {k, 0, lg}];
    a /@ Range[0, lg-1] (* Jean-François Alcover, Jan 07 2020 *)

Formula

a(n) = Sum_{k = 1..C(n, floor(n/2))} b(k, n), where b(k, n) is the number of k-antichain covers of a labeled n-set.
Inverse binomial transform of A000372. - Gus Wiseman, Feb 24 2019

Extensions

Last 3 terms from Michael Bulmer (mrb(AT)maths.uq.edu.au)
Antichain interpretation from Vladeta Jovovic and Goran Kilibarda, Jul 31 2000
a(0) = 2 added by Gus Wiseman, Feb 23 2019
Name edited by Petros Hadjicostas, Apr 08 2020
a(9) using A000372 added by Bruno L. O. Andreotti, May 14 2023
Showing 1-10 of 9093 results. Next