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

A006486 a(n) = largest prime factor of n^n - 1.

Original entry on oeis.org

3, 13, 17, 71, 43, 4733, 241, 757, 9091, 1806113, 20593, 1803647, 8108731, 39225301, 6700417, 2699538733, 465841, 109912203092239643840221, 222361, 227633407, 285451051007, 1920647391913, 1134793633, 50150933101, 3574533119, 12557612956332313, 1100860153
Offset: 2

Views

Author

Dennis S. Kluk (mathemagician(AT)ameritech.net)

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Max(PrimeDivisors(n^n-1)):n in [2..28]]; // Marius A. Burtea, Aug 24 2019
  • Mathematica
    Table[Max@Transpose[FactorInteger[n^n - 1]][[1]], {n, 2, 28}] (* Arkadiusz Wesolowski, Aug 06 2012 *)
  • PARI
    for(k=2, 28, my(x=factor(k^k-1), f=x[#x[, 1], 1]); print1(f,", ")) \\ Hugo Pfoertner, Aug 23 2019
    

Formula

a(n) = A006530(A048861(n)). - Michel Marcus, Aug 24 2019

Extensions

Corrected by T. D. Noe, Nov 14 2006
5 more terms from Arkadiusz Wesolowski, Aug 06 2012
Terms up to a(126) in b-file added by Sean A. Irvine, Apr 25 2017
Terms a(127)-a(138) in b-file added by Max Alekseyev, Aug 26 2021

A372228 a(n) is the largest prime factor of n^n + n.

Original entry on oeis.org

2, 3, 5, 13, 313, 101, 181, 5419, 21523361, 52579, 212601841, 57154490053, 815702161, 100621, 4454215139669, 4562284561, 52548582913, 1895634885375961, 211573, 2272727294381, 415710882920521, 9299179, 1853387306082786629, 22496867303759173834520497
Offset: 1

Views

Author

Tyler Busby, Apr 23 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[f = FactorInteger[n^n + n]; f[[Length[f]]][[1]], {n, 1, 25}] (* Vaclav Kotesovec, Apr 26 2024 *)
  • Python
    from sympy import primefactors
    def A372228(n): return max(max(primefactors(n),default=1),max(primefactors(n**(n-1)+1))) # Chai Wah Wu, Apr 27 2024

Formula

a(n) = A006530(A066068(n)).

A344859 a(n) is the number of divisors of n^n + 1.

Original entry on oeis.org

2, 2, 2, 6, 2, 8, 8, 16, 8, 16, 8, 96, 16, 32, 48, 160, 4, 12, 288, 48, 8, 64, 16, 512, 64, 128, 32, 3072, 64, 128, 1024, 384, 16, 2048, 64, 18432, 32, 128, 192, 512, 768, 64, 1024, 384, 256, 16384, 256, 2560, 64, 192, 1024, 3072, 32, 512, 16384, 4096, 128, 8192, 8192, 768, 4096, 256, 128, 1376256, 16
Offset: 0

Views

Author

Seiichi Manyama, May 31 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 2; a[n_] := DivisorSigma[0, n^n + 1]; Array[a, 45, 0] (* Amiram Eldar, May 31 2021 *)
  • PARI
    a(n) = numdiv(n^n+1);

Formula

a(n) = A000005(A014566(n)).

A372229 a(n) is the largest prime factor of n^n - n.

Original entry on oeis.org

2, 3, 7, 13, 311, 43, 337, 193, 333667, 13421, 266981089, 28393, 29914249171, 10678711, 1321, 184417, 7563707819165039903, 236377, 192696104561, 920421641, 12271836836138419, 39700406579747, 58769065453824529, 152587500001, 4315817869647001, 797161
Offset: 2

Views

Author

Tyler Busby, Apr 23 2024

Keywords

Crossrefs

Programs

  • Maple
    pf := n -> NumberTheory:-PrimeFactors(n): a := n -> max(pf(n^n - n));
    seq(a(n), n = 2..27);  # Peter Luschny, Apr 27 2024
  • Mathematica
    Table[f = FactorInteger[n^n-n]; f[[Length[f]]][[1]], {n,2,25}] (* Vaclav Kotesovec, Apr 26 2024 *)
  • Python
    from sympy import primefactors
    def A372229(n): return max(max(primefactors(n),default=1),max(primefactors(n**(n-1)-1),default=1)) # Chai Wah Wu, Apr 27 2024

Formula

a(n) = A006530(A061190(n)).

A085723 Number of prime divisors of n^n+1 (counted with multiplicity).

Original entry on oeis.org

1, 1, 3, 1, 3, 3, 5, 3, 4, 3, 7, 4, 5, 6, 9, 2, 4, 9, 6, 3, 6, 4, 10, 6, 7, 5, 12, 6, 7, 10, 11, 4, 11, 6, 15, 5, 7, 8, 10, 10, 6, 10, 9, 8, 14, 8, 13, 6, 8, 10, 12, 5, 10, 14, 13, 7, 13, 13, 10, 12, 8, 7, 24, 4, 12, 8, 8, 7, 17, 10, 11, 12, 4, 8, 25, 7, 9, 14, 10, 5, 12, 7, 13, 8
Offset: 1

Views

Author

Jason Earls, Jul 20 2003

Keywords

Comments

16^16+1 = 274177 * 67280421310721 is a semiprime. Where is the next?
a(73) >= 4. - Donovan Johnson, Sep 27 2010
According to factordb there are currently no other known candidates for semiprimes, with 781^781+1 being the largest fully factored number of this form. - Hugo Pfoertner, Aug 24 2019

Examples

			a(3) = 3: 3^3 + 1 = 28 = 2^2 * 7.
a(4) = 1: 4^4 + 1 = 257 is prime.
a(5) = 3: 5^5 + 1 = 3126 = 2 * 3 * 521.
		

Crossrefs

Programs

  • PARI
    for(k=1, 60, print1(bigomega(k^k+1),", ")) \\ Hugo Pfoertner, Aug 24 2019

Formula

a(n) = A001222(A014566(n)). - Amiram Eldar, Sep 27 2024

Extensions

More terms from Ray G. Opao, Aug 25 2004
Corrected 8 existing terms and a(46)-a(72) from Donovan Johnson, Sep 27 2010
a(73)-a(84) added by Hugo Pfoertner, Aug 24 2019

A125136 Triangle read by rows in which row n gives list of prime factors of p^p + 1 where p = prime(n).

Original entry on oeis.org

5, 2, 2, 7, 2, 3, 521, 2, 2, 2, 113, 911, 2, 2, 3, 23, 89, 199, 58367, 2, 7, 13417, 20333, 79301, 2, 3, 3, 45957792327018709121, 2, 2, 5, 108301, 1049219, 870542161121, 2, 2, 2, 3, 47, 139, 1013, 1641281, 52626071, 1522029233, 2, 3, 5, 233, 6864997
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2007

Keywords

Comments

Product over the n-th row of the table is A051674(n) + 1. The number of elements in the n-th row is A115973(n). - R. J. Mathar, Jan 22 2007
(p + 1) divides p^p + 1 for odd prime p. - Alexander Adamchuk, Jan 22 2007

Examples

			Rows read
  5;
  2, 2, 7;
  2, 3, 521;
  2, 2, 2, 113, 911;
  2, 2, 3, 23, 89, 199, 58367;
  2, 7, 13417, 20333, 79301;
  2, 3, 3, 45957792327018709121;
  2, 2, 5, 108301, 1049219, 870542161121;
  2, 2, 2, 3, 47, 139, 1013, 1641281, 52626071, 1522029233;
  2, 3, 5, 233, 6864997, 9487923853, 5639663878716545087233;
  2, 2, 2, 2, 2, 373, 1613, 62869, 145577, 35789156484227, 2706690202468649;
  etc.
		

Crossrefs

Cf. A007571 = largest factor of n^n + 1.

Programs

  • Maple
    pfs := proc(n) local ifs,a,e,b ; ifs := ifactors(n)[2] ; a := [] ; for b from 1 to nops(ifs) do for e from 1 to op(2,op(b,ifs)) do a := [op(a),op(1,op(b,ifs))] ; od ; od ; RETURN(a) ; end; A125136 := proc(nmax) local a,p,n,pp ; a := [] ; p := 2 ; while nops(a) < nmax do a := [op(a),op(pfs(p^p+1))] ; p := nextprime(p) ; od ; RETURN(a) ; end; A125136(40) ; # R. J. Mathar, Jan 22 2007
  • Mathematica
    lpf[n_]:=Flatten[Table[#[[1]],#[[2]]]&/@FactorInteger[n]]; lpf/@(#^#+1&/@ Prime[Range[10]])//Flatten (* Harvey P. Dale, Oct 18 2020 *)

Extensions

More terms from Alexander Adamchuk and R. J. Mathar, Jan 22 2007

A116895 Least prime factor of n^n-1.

Original entry on oeis.org

3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 13, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2
Offset: 2

Views

Author

Giovanni Resta, Mar 02 2006

Keywords

Comments

If n is odd then a(n)=2; also, if n is even and not divisible by 3 then a(n)=3. - Zak Seidov, Mar 03 2006

Examples

			6^6-1=5*7*31*43, so a(6)=5.
		

Crossrefs

Programs

  • Mathematica
    Table[FactorInteger[GCD[n^n-1, 200! ]][[1,1]], {n, 2, 130}]
  • PARI
    A116895(n) = { my(k=(n^n)-1); forprime(p=2, ,if(!(k%p),return(p))); }; \\ Antti Karttunen, Dec 19 2018

A216487 Smallest prime factor of n^(2n) - 1 having the form k*n+1.

Original entry on oeis.org

3, 7, 5, 11, 7, 29, 17, 19, 11, 23, 13, 53, 29, 31, 17, 10949, 19, 108301, 41, 43, 23, 47, 73, 101, 53, 109, 29, 59, 31, 373, 257, 67, 103, 71, 37, 149, 191, 79, 41, 83, 43, 173, 89, 181, 47, 659, 97, 197, 101, 103, 53, 107, 109, 881, 113, 229, 59, 709, 61, 977
Offset: 2

Views

Author

Michel Lagneau, Sep 11 2012

Keywords

Comments

The corresponding values of k are in A216506.

Examples

			a(7) = 29 because 7^14 - 1 = 2 ^ 4 * 3 * 29 * 113 * 911 * 4733 and the smallest prime divisor of the form k*n+1 is 29 = 4*7+1.
		

Crossrefs

Programs

  • Mathematica
    Table[p=First/@FactorInteger[n^(2*n)-1]; Select[p, Mod[#1, n] == 1 &, 1][[1]], {n, 2, 41}]
    a[n_] := Module[{m = n + 1}, While[!PrimeQ[m] || PowerMod[n, 2*n, m] != 1, m += n]; m]; Array[a, 100, 2] (* Amiram Eldar, May 17 2024 *)
  • PARI
    a(n) = {my(m = n + 1); while(!isprime(m) || Mod(n, m)^(2*n) != 1, m += n); m;} \\ Amiram Eldar, May 17 2024

Formula

a(n) = Min{A187022(n), A187023(n)}.

Extensions

Data corrected by Amiram Eldar, May 17 2024

A216506 Least number k such that k*n+1 is a prime dividing n^(2n) - 1.

Original entry on oeis.org

1, 2, 1, 2, 1, 4, 2, 2, 1, 2, 1, 4, 2, 2, 1, 644, 1, 5700, 2, 2, 1, 2, 3, 4, 2, 4, 1, 2, 1, 12, 8, 2, 3, 2, 1, 4, 5, 2, 1, 2, 1, 4, 2, 4, 1, 14, 2, 4, 2, 2, 1, 2, 2, 16, 2, 4, 1, 12, 1, 16, 273, 2, 3, 2, 1, 4, 2, 2, 1, 246, 1, 4, 2, 2, 16, 8, 1, 4, 15, 2, 1, 2, 4, 12
Offset: 2

Views

Author

Michel Lagneau, Sep 11 2012

Keywords

Comments

The corresponding prime factors of n^(2n)-1 of the form k*n+1 is in A216487.

Examples

			a(7) = 4 because 7^14 - 1 = 2 ^ 4 * 3 * 29 * 113 * 911 * 4733 and the smallest prime divisor of the form k*n+1 is 29 = 4*7+1 => k = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[p=First/@FactorInteger[n^(2*n)-1]; (Select[p, Mod[#1, n] == 1 &, 1][[1]]-1)/n, {n, 2, 50}]
    a[n_] := Module[{m = n + 1}, While[!PrimeQ[m] || PowerMod[n, 2*n, m] != 1, m += n]; (m - 1)/n]; Array[a, 100, 2] (* Amiram Eldar, May 17 2024 *)
  • PARI
    a(n) = {my(m = n + 1); while(!isprime(m) || Mod(n, m)^(2*n) != 1, m += n); (m - 1)/n;} \\ Amiram Eldar, May 17 2024

Extensions

Data corrected and extended by Amiram Eldar, May 17 2024

A366820 a(n) is the sum of the divisors of n^n + 1.

Original entry on oeis.org

3, 3, 6, 56, 258, 6264, 52136, 1559520, 17041416, 706911048, 10102223208, 706019328000, 9101898907920, 519285252355776, 11672709747324912, 880565163670372352, 18446811354131136516, 1792353900753729655758, 54357680125881245248800, 4154723599066412190910560
Offset: 0

Views

Author

Sean A. Irvine, Oct 24 2023

Keywords

Crossrefs

Programs

  • Mathematica
    {3}~Join~Array[DivisorSigma[1, #^# + 1] &, 19] (* Michael De Vlieger, Oct 24 2023 *)
  • PARI
    a(n) = sigma(n^n+1);

Formula

a(n) = A000203(A014566(n)).
Showing 1-10 of 12 results. Next