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.

A005420 Largest prime factor of 2^n - 1.

Original entry on oeis.org

3, 7, 5, 31, 7, 127, 17, 73, 31, 89, 13, 8191, 127, 151, 257, 131071, 73, 524287, 41, 337, 683, 178481, 241, 1801, 8191, 262657, 127, 2089, 331, 2147483647, 65537, 599479, 131071, 122921, 109, 616318177, 524287, 121369, 61681, 164511353, 5419
Offset: 2

Views

Author

Keywords

Examples

			2^6 - 1 = 63 = 3*21 = 9*7, so a(6) = 7.
		

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. similar sequences listed in A274906.
Cf. A337431 (a(n)=a(2n)), A359063 (a(n)=a(2n)=a(4n)), A359088.

Programs

  • Magma
    [Maximum(PrimeDivisors(2^n-1)): n in [2..45]]; // Vincenzo Librandi, Jul 13 2016
  • Mathematica
    a[n_] := a[n] = FactorInteger[2^n-1] // Last // First; Table[Print[{n, a[n]}, If[2^n-1 == a[n], " Mersenne prime", " "]]; a[n], {n, 2, 127}] (* Jean-François Alcover, Dec 11 2012 *)
    Table[FactorInteger[2^n - 1][[-1, 1]], {n, 2, 40}] (* Vincenzo Librandi, Jul 13 2016 *)
  • PARI
    for(n=2,44, v=factor(2^n-1)[,1]; print1(v[#v]", "));
    
  • PARI
    a(n) = vecmax(factor(2^n-1)[,1]); \\ Michel Marcus, Dec 15 2022
    

Formula

a(n) = a(2n) iff a(n) > A002587(n). See A337431. - Thomas Ordowski, Jan 07 2014
a(n) = A006530(A000225(n)). - Vincenzo Librandi, Jul 13 2016
a(n) = 2^n-1 = A000225(n) iff n is a Mersenne exponent (A000043). - Bernard Schott, Dec 11 2022

Extensions

Description corrected by Michael Somos, Feb 24 2002
More terms from Rick L. Shepherd, Aug 22 2002
Incorrect comments removed by Michel Marcus, Dec 15 2022