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

A152155 Minimal residues of Pepin's Test for Fermat Numbers using the base 3.

Original entry on oeis.org

0, -1, -1, -1, -1, 10324303, -6586524273069171148, 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)).
Any positive integer k for which the Jacobi symbol (k|F(n)) is -1 can be used as the base instead.

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

Programs

  • Maple
    f:= proc(n) local F;
       F:= 2^(2^n) + 1;
       `mods`(3 &^ ((F-1)/2), F)
    end proc:
    seq(f(n), n=0..10); # Robert Israel, Dec 19 2016
  • PARI
    a(n)=centerlift(Mod(3,2^(2^n)+1)^(2^(2^n-1))) \\ Jeppe Stig Nielsen, Dec 19 2016

Formula

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

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
Showing 1-3 of 3 results.