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 23 results. Next

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

A054992 Number of prime factors of 2^n + 1 (counted with multiplicity).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 4, 3, 2, 2, 2, 3, 4, 1, 2, 4, 2, 2, 4, 3, 2, 3, 4, 4, 6, 2, 3, 6, 2, 2, 5, 4, 5, 4, 3, 4, 4, 2, 3, 6, 2, 3, 7, 5, 3, 3, 3, 7, 6, 3, 3, 6, 6, 3, 5, 3, 4, 4, 2, 5, 7, 2, 6, 6, 3, 4, 5, 7, 3, 5, 3, 5, 7, 4, 6, 10, 2, 3, 10, 5, 6, 5, 4, 5, 5, 4, 4, 11, 6, 2, 5, 4, 5, 3, 5, 6, 9, 6, 2, 9, 3
Offset: 1

Views

Author

Arne Ring (arne.ring(AT)epost.de), May 30 2000

Keywords

Comments

The length of row n in A001269.

Examples

			a(3) = 2 because 2^3 + 1 = 9 = 3*3.
		

Crossrefs

bigomega(b^n+1): A057934 (b=10), A057935 (b=9), A057936 (b=8), A057937 (b=7), A057938 (b=6), A057939 (b=5), A057940 (b=4), A057941 (b=3), this sequence (b=2).
Cf. A046051 (number of prime factors of 2^n-1).
Cf. A086257 (number of primitive prime factors).

Programs

Formula

a(n) = A046051(2n) - A046051(n). - T. D. Noe, Jun 18 2003
a(n) = A001222(A000051(n)). - Amiram Eldar, Oct 04 2019

Extensions

Extended by Patrick De Geest, Oct 01 2000
Terms to a(500) in b-file from T. D. Noe, Nov 10 2007
Deleted duplicate (and broken) Wagstaff link. - N. J. A. Sloane, Jan 18 2019
a(500)-a(1062) in b-file from Amiram Eldar, Oct 04 2019
a(1063)-a(1128) in b-file from Max Alekseyev, Jul 15 2023, Mar 15 2025

A046798 Number of divisors of 2^n + 1.

Original entry on oeis.org

2, 2, 2, 3, 2, 4, 4, 4, 2, 8, 6, 4, 4, 4, 8, 12, 2, 4, 16, 4, 4, 12, 8, 4, 8, 16, 16, 20, 4, 8, 48, 4, 4, 24, 16, 32, 16, 8, 16, 12, 4, 8, 64, 4, 8, 64, 32, 8, 8, 8, 64, 48, 8, 8, 64, 48, 8, 24, 8, 16, 16, 4, 32, 64, 4, 64, 64, 8, 12, 24, 96, 8, 32, 8, 32, 96, 16, 64, 768, 4, 8, 192, 32, 64
Offset: 0

Views

Author

Keywords

Comments

a(n) is odd iff n = 3, as a consequence of the Catalan-Mihăilescu theorem. - Bernard Schott, Oct 05 2021

Examples

			a(7)=4, because 2^7 + 1 = 129 has 4 divisors.
		

Crossrefs

Programs

Formula

a(n) = A000005(A000051(n)). - Michel Marcus, Mar 18 2017

A074476 Largest prime factor of 3^n + 1.

Original entry on oeis.org

2, 2, 5, 7, 41, 61, 73, 547, 193, 37, 1181, 661, 6481, 398581, 16493, 271, 21523361, 1021, 530713, 101917, 42521761, 2269, 570461, 23535794707, 769, 22996651, 4795973261, 19927, 647753, 5385997, 47763361, 22434744889, 926510094425921
Offset: 0

Views

Author

Rick L. Shepherd, Aug 23 2002

Keywords

Crossrefs

Cf. A006530, A034472, A074477 (largest prime factor of 3^n - 1), A002587 (largest prime factor of 2^n + 1), A074478 (largest prime factor of 5^n + 1).

Programs

  • Magma
    [Maximum(PrimeDivisors(3^n+1)): n in [0..40]]; // Vincenzo Librandi, Aug 23 2013
  • Mathematica
    Table[FactorInteger[3^n + 1][[-1, 1]], {n, 0, 40}] (* Vincenzo Librandi, Aug 23 2013 *)
  • PARI
    for(n=0,35, v=factor(3^n+1); print1(v[matsize(v)[1],1],","))
    

Formula

a(n) = A006530(A034472(n)). - Amiram Eldar, Feb 01 2020

Extensions

Terms to a(100) in b-file from Vincenzo Librandi, Aug 23 2013
a(101)-a(658) in b-file from Amiram Eldar, Feb 01 2020
a(659)-a(691) in b-file from Max Alekseyev, Apr 25 2022, Jul 25 2023

A274903 Largest prime factor of 4^n + 1.

Original entry on oeis.org

2, 5, 17, 13, 257, 41, 241, 113, 65537, 109, 61681, 2113, 673, 1613, 15790321, 1321, 6700417, 26317, 38737, 525313, 4278255361, 14449, 2931542417, 30269, 22253377, 268501, 308761441, 279073, 54410972897, 536903681, 4562284561, 384773, 67280421310721
Offset: 0

Views

Author

Vincenzo Librandi, Jul 11 2016

Keywords

Examples

			4^3 + 1 = 65 = 5*13, so a(3) = 13.
		

Crossrefs

Cf. largest prime factor of k^n+1: A002587 (k=2), A074476 (k=3), this sequence (k=4), A074478 (k=5), A274904 (k=6), A227575 (k=7), A274905 (k=8), A002592 (k=9), A003021 (k=10), A062308 (k=11).

Programs

  • Magma
    [Maximum(PrimeDivisors(4^n+1)): n in [0..35]];
    
  • Mathematica
    Table[FactorInteger[4^n + 1][[-1, 1]], {n, 0, 30}]
  • PARI
    a(n)=my(f=factor(4^n+1)[,1]); f[#f] \\ Charles R Greathouse IV, Jul 12 2016

Formula

a(n) = A006530(A052539(n)). - Michel Marcus, Jul 11 2016
a(2n) = A002590(n). a(2n+1) = A229747(n). - R. J. Mathar, Feb 28 2018
a(n) = A002587(2*n). - Amiram Eldar, Feb 01 2020

Extensions

Terms to a(100) in b-file from Vincenzo Librandi, Jul 12 2016
a(101)-a(531) in b-file from Amiram Eldar, Feb 01 2020
a(532)-a(583) in b-file from Max Alekseyev, Apr 25 2022, Mar 15 2025

A002586 Smallest prime factor of 2^n + 1.

Original entry on oeis.org

3, 5, 3, 17, 3, 5, 3, 257, 3, 5, 3, 17, 3, 5, 3, 65537, 3, 5, 3, 17, 3, 5, 3, 97, 3, 5, 3, 17, 3, 5, 3, 641, 3, 5, 3, 17, 3, 5, 3, 257, 3, 5, 3, 17, 3, 5, 3, 193, 3, 5, 3, 17, 3, 5, 3, 257, 3, 5, 3, 17, 3, 5, 3, 274177, 3, 5, 3, 17, 3, 5, 3, 97, 3, 5, 3, 17, 3, 5, 3, 65537, 3, 5, 3, 17, 3, 5
Offset: 1

Views

Author

Keywords

Comments

Conjecture: a(8+48*k) = 257 and a(40+48*k) = 257, where k is a nonnegative integer. - Thomas König, Feb 15 2017
Conjecture is true: 257 divides 2^(8+48*k)+1 and 2^(40+48*k)+1 but no prime < 257 ever does. Similarly, a(24+48*k) = 97. - Robert Israel, Feb 17 2017
From Robert Israel, Feb 17 2017: (Start)
If a(n) = p, there is some m such that a(n+m*j*n) = p for all j.
In particular, every member of the sequence occurs infinitely often.
a(k*n) <= a(n) for any odd k. (End)

Examples

			a(2^k) = 3, 5, 17, 257, 65537 is the k-th Fermat prime 2^(2^k) + 1 = A019434(k) for k = 0, 1, 2, 3, 4. - _Jonathan Sondow_, Nov 28 2012
		

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.
  • M. Kraitchik, Recherches sur la Théorie des Nombres, Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 2, p. 85.
  • 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

Programs

  • Mathematica
    f[n_] := FactorInteger[2^n + 1][[1, 1]]; Array[f, 100] (* Robert G. Wilson v, Nov 28 2012 *)
    FactorInteger[#][[1,1]]&/@(2^Range[90]+1) (* Harvey P. Dale, Jul 25 2024 *)
  • PARI
    a(n) = my(m=n%8); if(m, [3, 5, 3, 17, 3, 5, 3][m], factor(2^n+1)[1,1]); \\ Ruud H.G. van Tol, Feb 16 2024
    
  • Python
    from sympy import primefactors
    smallest_primef = []
    for n in range(1,87):
        y = (2 ** n) + 1
        smallest_primef.append(min(primefactors(y)))
    print(smallest_primef) # Adrienne Leonardo, Dec 29 2024

Formula

a(n) = 3, 5, 3, 17, 3, 5, 3 for n == 1, 2, 3, 4, 5, 6, 7 (mod 8). (Proof. Let n = k*odd with k = 1, 2, or 4. As 2^k = 2, 4, 16 == -1 (mod 3, 5, 17), we get 2^n + 1 = 2^(k*odd) + 1 = (2^k)^odd + 1 == (-1)^odd + 1 == 0 (mod 3, 5, 17). Finally, 2^n + 1 !== 0 (mod p) for prime p < 3, 5, 17, respectively.) - Jonathan Sondow, Nov 28 2012

Extensions

More terms from James Sellers, Jul 06 2000
Definition corrected by Jonathan Sondow, Nov 27 2012

A274906 Largest prime factor of 4^n - 1.

Original entry on oeis.org

3, 5, 7, 17, 31, 13, 127, 257, 73, 41, 683, 241, 8191, 127, 331, 65537, 131071, 109, 524287, 61681, 5419, 2113, 2796203, 673, 4051, 8191, 262657, 15790321, 3033169, 1321, 2147483647, 6700417, 599479, 131071, 122921, 38737, 616318177, 525313, 22366891
Offset: 1

Views

Author

Vincenzo Librandi, Jul 11 2016

Keywords

Examples

			4^7 - 1 = 16383 = 3*43*127, so a(7) = 127
		

Crossrefs

Second bisection of A005420. - Michel Marcus, Jul 13 2016
Cf. largest prime factor of k^n-1: A005420 (k=2), A074477 (k=3), this sequence (k=4), A074479 (k=5), A274907 (k=6), A074249 (k=7), A274908 (k=8), A274909 (k=9), A005422 (k=10), A274910 (k=11).

Programs

  • Magma
    [Maximum(PrimeDivisors(4^n-1)): n in [1..40]];
  • Mathematica
    Table[FactorInteger[4^n - 1][[-1, 1]], {n, 40}]

Formula

a(n) = A006530(A024036(n)). - Michel Marcus, Jul 11 2016
a(n) = max(A002587(n),A005420(n)). - Max Alekseyev, Apr 25 2022

Extensions

Terms to a(100) in b-file from Vincenzo Librandi, Jul 13 2016
a(101)-a(603) in b-file from Amiram Eldar, Feb 08 2020
a(604)-a(1128) in b-file from Max Alekseyev, Jul 25 2023, Mar 15 2025

A069061 Sum of divisors of 2^n+1.

Original entry on oeis.org

4, 6, 13, 18, 48, 84, 176, 258, 800, 1302, 2736, 4356, 10928, 20520, 51792, 65538, 174768, 351120, 699056, 1110276, 3100240, 5048232, 11184816, 17041416, 49012992, 82623888, 211053040, 284225796, 727960800, 1494039792, 2863311536, 4301668356, 12611914848, 20788904016
Offset: 1

Views

Author

Benoit Cloitre, Apr 04 2002

Keywords

Crossrefs

Programs

  • Mathematica
    DivisorSigma[1, 2^Range[50] + 1] (* Paolo Xausa, Jul 05 2024 *)
  • PARI
    a(n) = sigma(2^n+1); \\ Michel Marcus, Nov 24 2013

Formula

a(n) = sigma(2^n+1).
a(n) = A000203(A000051(n)). - Michel Marcus, Nov 24 2013

Extensions

More terms from Amiram Eldar, Oct 04 2019

A053285 Totient of 2^n+1.

Original entry on oeis.org

1, 2, 4, 6, 16, 20, 48, 84, 256, 324, 800, 1364, 3840, 5460, 12544, 19800, 65536, 87380, 186624, 349524, 986880, 1365336, 3345408, 5592404, 16515072, 20250000, 52306176, 84768120, 252645120, 351847488, 760320000, 1431655764, 4288266240, 5632621632, 13628740608
Offset: 0

Views

Author

Labos Elemer, Mar 03 2000

Keywords

Examples

			It is a power of 2 iff n is a Fermat prime.
		

Crossrefs

Programs

Formula

a(n) = A000010(A000051(n)).

Extensions

a(0)=1 prepended by Alois P. Heinz, Aug 12 2015

A074478 Largest prime factor of 5^n + 1.

Original entry on oeis.org

2, 3, 13, 7, 313, 521, 601, 449, 11489, 5167, 9161, 5281, 390001, 38923, 234750601, 7621, 29423041, 41540861, 6597973, 213029, 632133361, 7603, 1030330938209, 42272797713043, 152587500001, 50150933101, 83181652304609, 16018507
Offset: 0

Views

Author

Rick L. Shepherd, Aug 23 2002

Keywords

Examples

			5^11 + 1 = 48828126 = 2*3*23*67*5281, so a(11) = 5281.
		

Crossrefs

Cf. A002587 (largest prime factor of 2^n + 1), A074479 (largest prime factor of 5^n - 1), A074476 (largest prime factor of 3^n + 1), A227575 (largest prime factor of 7^n + 1).

Programs

  • Magma
    [Maximum(PrimeDivisors(5^n+1)): n in [0..30]]; // Vincenzo Librandi, Jul 09 2016
  • Mathematica
    Table[FactorInteger[5^n + 1][[-1, 1]], {n, 0, 30}] (* Bruno Berselli, Aug 23 2013 *)
  • PARI
    for(n=0,30, v=factor(5^n+1); print1(v[matsize(v)[1],1],","))
    

Formula

a(n) = A006530(A034474(n)). - Michel Marcus, Jul 09 2016

Extensions

Terms to a(100) in b-file from Vincenzo Librandi, Jul 09 2016
a(101)-a(451) in b-file from Amiram Eldar, Feb 01 2020
a(452)-a(471) in b-file from Max Alekseyev, Apr 25 2022, Jan 04 2024
Showing 1-10 of 23 results. Next