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-6 of 6 results.

A159611 Indices of the Fermat primes in the sequence of primes.

Original entry on oeis.org

2, 3, 7, 55, 6543
Offset: 1

Views

Author

Walter Nissen, Apr 16 2009

Keywords

Comments

If it exists, a(6) >= primepi(2^(2^33)+1) which has more than 2*10^9 decimal digits. - Amiram Eldar, Sep 27 2024

Examples

			3, the 1st Fermat prime is the 2nd prime, so a(1) = 2.
17, the 3rd Fermat prime is the 7th prime, so a(3) = 7.
		

Crossrefs

Cf. A000040 (primes), A000720, A019434 (Fermat primes).
Cf. A098006.

Programs

  • Haskell
    import Data.List (elemIndices)
    a159611 n = a159611_list !! (n-1)
    a159611_list = map (+ 2) $ elemIndices 0 a098006_list
    -- Reinhard Zumkeller, Mar 26 2013
    
  • Mathematica
    PrimePi/@{3,5,17,257,65537} (* Harvey P. Dale, Aug 07 2022 *)
  • PARI
    for(i=0, 10, isprime(f=2^2^i+1) & print1(primepi(f), ", ")) \\ Michel Marcus, Apr 28 2016
    
  • PARI
    a152155(n) = centerlift(Mod(3, 2^(2^n)+1)^(2^(2^n-1)))
    print1(2, ", "); for(x=0, oo, if(a152155(x)==-1, print1(primepi(2^(2^x)+1), ", "))) \\ Felix Fröhlich, Apr 30 2021

Formula

A098006(a(n)) = 0. - Reinhard Zumkeller, Mar 26 2013
a(n) = A000720(A019434(n)). - Michel Marcus, Apr 29 2021

Extensions

Name edited by Felix Fröhlich, Apr 30 2021

A152153 Positive residues of Pepin's Test for Fermat numbers using the base 3.

Original entry on oeis.org

0, 4, 16, 256, 65536, 10324303, 11860219800640380469, 110780954395540516579111562860048860420, 5864545399742183862578018016183410025465491904722516203269973267547486512819
Offset: 0

Views

Author

Dennis Martin (dennis.martin(AT)dptechnology.com), Nov 27 2008

Keywords

Comments

For n>=1 the Fermat Number F(n) is prime if and only if 3^((F(n) - 1)/2) is congruent to -1 (mod F(n)).

Examples

			a(4) = 3^(32768) (mod 65537) = 65536 = -1 (mod F(4)), therefore F(4) is prime.
a(5) = 3^(2147483648) (mod 4294967297) = 10324303 (mod F(5)), therefore F(5) is composite.
		

References

  • M. Krizek, F. Luca & L. Somer, 17 Lectures on Fermat Numbers, Springer-Verlag NY 2001, pp. 42-43.

Crossrefs

Formula

a(n) = 3^((F(n) - 1)/2) (mod F(n)), where F(n) is the n-th Fermat Number

A152154 Positive residues of Pepin's Test for Fermat numbers using either 5 or 10 for the base.

Original entry on oeis.org

2, 0, 16, 256, 65536, 3484838166, 17225898269543404863, 6964187975677595099156927503004398881, 14553806122642016769237504145596730952769427034161327480375008633175279343120
Offset: 0

Views

Author

Dennis Martin (dennis.martin(AT)dptechnology.com), Nov 27 2008

Keywords

Comments

For n=0 or n>=2 the Fermat Number F(n) is prime if and only if 5^((F(n) - 1)/2) is congruent to -1 (mod F(n)).
5 was the base originally used by Pepin. The base 10 gives the same results.
Any positive integer k for which the Jacobi symbol (k|F(n)) is -1 can be used as the base instead.

Examples

			a(4) = 5^(32768) (mod 65537) = 65536 = -1 (mod F(4)), therefore F(4) is prime.
a(5) = 5^(2147483648) (mod 4294967297) = 3484838166 (mod F(5)), therefore F(5) is composite.
		

References

  • M. Krizek, F. Luca & L. Somer, 17 Lectures on Fermat Numbers, Springer-Verlag NY 2001, pp. 42-43.

Crossrefs

Formula

a(n) = 5^((F(n) - 1)/2) (mod F(n)), where F(n) is the n-th Fermat Number

A152156 Minimal residues of Pepin's Test for Fermat Numbers using either 5 or 10 for the base.

Original entry on oeis.org

-1, 0, -1, -1, -1, -810129131, -1220845804166146754, 6964187975677595099156927503004398881, 14553806122642016769237504145596730952769427034161327480375008633175279343120
Offset: 0

Views

Author

Dennis Martin (dennis.martin(AT)dptechnology.com), Nov 27 2008

Keywords

Comments

For n=0 or n>=2 the Fermat Number F(n) is prime if and only if 5^((F(n) - 1)/2) is congruent to -1 (mod F(n)).
5 was the base originally used by Pepin. The base 10 gives the same results.
Any positive integer k for which the Jacobi symbol (k|F(n)) is -1 can be used as the base instead.

Examples

			a(4) = 5^(32768) (mod 65537) = 65536 = -1 (mod F(4)), therefore F(4) is prime.
a(5) = 5^(2147483648) (mod 4294967297) = -810129131 (mod F(5)), therefore F(5) is composite.
		

References

  • M. Krizek, F. Luca & L. Somer, 17 Lectures on Fermat Numbers, Springer-Verlag NY 2001, pp. 42-43.

Crossrefs

Formula

a(n) = 5^((F(n) - 1)/2) (mod F(n)), where F(n) is the n-th Fermat Number

A281576 Composite Fermat numbers.

Original entry on oeis.org

4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937
Offset: 1

Views

Author

Felix Fröhlich, Jan 24 2017

Keywords

Comments

Complement of A019434 in A000215.
Intersection of A000215 and A002808.
Fermat numbers F_i such that A152155(i) != -1, where i is the index of F in A000215.
Is this sequence infinite?
All the terms are Fermat pseudoprimes to base 2 (A001567). For a proof see, e.g., Jaroma and Reddy (2007). - Amiram Eldar, Jul 24 2021

Crossrefs

Programs

  • PARI
    a152155(n) = centerlift(Mod(3, 2^(2^n)+1)^(2^(2^n-1)))
    terms(n) = my(i=0, k=1); while(1, if(a152155(k)!=-1, print1(2^(2^k)+1, ", "); i++); if(i==n, break); k++)
    terms(4) \\ print initial 4 terms

A281577 Irregular triangle read by rows: T(n, k) = A281576(n) modulo p^2, where p is the k-th prime factor of A281576(n) with p < sqrt(A281576(n)).

Original entry on oeis.org

28204, 17161560961, 2451293172821355028751076998879853, 1409441895293467096954080352837, 1385195550582, 17782786311867894562037823351528977990025091057921642664123352687840735480821116989430796689072791
Offset: 1

Views

Author

Felix Fröhlich, Jan 24 2017

Keywords

Comments

The question whether T(n, k) = 0 for any values of n and k is an open problem (see Ribenboim p. 64, open problem (3)).

Examples

			Triangle T(n, k) starts
                                  28204
                            17161560961
     2451293172821355028751076998879853
        1409441895293467096954080352837
                 1385195550582, T(5, 2)
Note: T(5, 2) is not displayed here due to its size. The term can be seen in the Data section.
		

References

  • P. Ribenboim, The Little Book of Bigger Primes, Springer Verlag, 1991.

Crossrefs

Programs

  • PARI
    a152155(n) = centerlift(Mod(3, 2^(2^n)+1)^(2^(2^n-1)))
    row(n) = my(i=0, k=1); while(1, if(a152155(k)!=-1, i++); if(i==n, forprime(p=1, sqrtint(2^(2^k)+1), if(Mod(2, p)^(2^k)==-1, print1(lift(Mod(2, p^2)^(2^k))+1, ", ")))); k++)
    trianglerows(n) = for(k=1, n, row(k); print(""))
Showing 1-6 of 6 results.