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

A007571 a(n) = largest prime factor of n^n + 1.

Original entry on oeis.org

2, 5, 7, 257, 521, 97, 911, 673, 530713, 27961, 58367, 2227777, 79301, 176597, 142111, 67280421310721, 45957792327018709121, 33388093, 870542161121, 4406613081041681, 22864311556633, 73194743542229, 1522029233, 27250359649
Offset: 1

Views

Author

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 [1..24]]; // Marius A. Burtea, Aug 24 2019
  • Mathematica
    Table[ FactorInteger[ n^n + 1, FactorComplete -> True ] [ [ -1, 1 ] ], {n, 1, 25} ]
  • PARI
    for(k=1, 24, my(x=factor(k^k+1), f=x[#x[, 1], 1]); print1(f,", ")) \\ Hugo Pfoertner, Aug 23 2019
    

Formula

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

A125135 Triangle read by rows in which row n lists prime factors of p^p - 1 where p = prime(n).

Original entry on oeis.org

3, 2, 13, 2, 2, 11, 71, 2, 3, 29, 4733, 2, 5, 15797, 1806113, 2, 2, 3, 53, 264031, 1803647, 2, 2, 2, 2, 10949, 1749233, 2699538733, 2, 3, 3, 109912203092239643840221, 2, 11, 461, 1289, 831603031789, 1920647391913
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2007

Keywords

Examples

			Triangle begins:
3;
2, 13;
2, 2, 11, 71;
2, 3, 29, 4733;
2, 5, 15797, 1806113;
2, 2, 3, 53, 264031, 1803647;
2, 2, 2, 2, 10949, 1749233, 2699538733;
2, 3, 3, 109912203092239643840221;
2, 11, 461, 1289, 831603031789, 1920647391913;
2, 2, 7, 59, 16763, 84449, 2428577, 14111459, 58320973, 549334763;
...
n=4: p=7, 7^7-1 = 823542 = 2*3*29*4733 gives row 4.
		

Crossrefs

Programs

  • Magma
    for p in [ n : n in [1..100] | IsPrime(n) ] do "\nDoing p =", p; n := p^p -1; Factorisation(n); end for; // John Cannon
  • Maple
    T:= n-> (p-> sort(map(i-> i[1]$i[2], ifactors(p^p-1)[2]))[])(ithprime(n)):
    seq(T(n), n=1..10);  # Alois P. Heinz, May 20 2022

A334167 a(n) is the number of divisors of n^n-1.

Original entry on oeis.org

2, 4, 8, 12, 16, 16, 96, 128, 48, 16, 256, 48, 32, 128, 128, 40, 512, 12, 2048, 768, 256, 64, 6144, 4096, 768, 512, 4096, 768, 24576, 16, 6144, 768, 8192, 1024, 262144, 1152, 256, 1024, 49152, 256, 65536, 64, 24576, 196608, 384, 32, 393216, 327680, 12288, 24576
Offset: 2

Views

Author

Todor Szimeonov, Apr 17 2020

Keywords

Comments

25 values of the first 40 are powers of 2.

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSigma[0, n^n - 1]; a /@ Range[2, 45] (* Giovanni Resta, Apr 17 2020 *)
  • PARI
    a(n) = numdiv(n^n-1); \\ Michel Marcus, Apr 17 2020

Formula

a(n) = A000005(A048861(n)).

Extensions

More terms from Giovanni Resta, Apr 17 2020

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)).

A309941 Number of prime factors of n^n - 1, counted with multiplicity.

Original entry on oeis.org

1, 2, 3, 4, 4, 4, 7, 8, 6, 4, 8, 6, 5, 7, 7, 7, 10, 4, 11, 10, 8, 6, 13, 13, 11, 9, 13, 10, 15, 4, 13, 12, 13, 10, 18, 11, 8, 10, 16, 9, 16, 6, 15, 18, 9, 5, 19, 20, 14, 15, 17, 8, 16, 12, 18, 10, 10, 5, 26, 8, 10, 14, 20, 19, 17, 9, 17, 12, 19, 7, 29, 15, 8, 11, 20, 13, 21, 8
Offset: 2

Views

Author

Hugo Pfoertner, Aug 24 2019

Keywords

Examples

			a(3) = 2: 3^3 - 1 = 26 = 2 * 13.
a(5) = 4: 5^5 - 1 = 3124 = 2^2 * 11 * 71.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := PrimeOmega[n^n - 1]; Array[a, 45, 2] (* Amiram Eldar, Jul 04 2024 *)
  • PARI
    for(k=2, 50, print1(bigomega(k^k-1),", "))

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)).

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

A319183 a(n) = phi(n^n - 1)/n where phi is A000010.

Original entry on oeis.org

1, 4, 32, 280, 5040, 37856, 829440, 15676416, 589032000, 10374307328, 388566097920, 7619466454080, 390751784579520, 11138729990400000, 575561351791902720, 24328359845627701248, 1640651748984970444800, 34709116765970413844280, 2459108342476800000000000
Offset: 2

Views

Author

Seiichi Manyama, Sep 12 2018

Keywords

Comments

Main diagonal of the array T(n,k) = phi(n^k-1)/k for n > 1 and k > 1, which starts
1, 2, 2, 6, 6, 18, 16, ... A011260
2, 4, 8, 22, 48, 156, 320, ... A027385
4, 12, 32, 120, 288, 1512, 4096, ... A027695
4, 20, 48, 280, 720, 5580, 14976, ... A027741
12, 56, 216, 1240, 5040, 31992, 139968, ... A295496
8, 36, 160, 1120, 6048, 37856, 192000, ... A027743
18, 144, 432, 5400, 23328, 254016, 829440, ... A027744

Crossrefs

A diagonal of A369291.

Programs

  • Mathematica
    Table[EulerPhi[n^n-1]/n,{n,20}] (* Harvey P. Dale, Aug 04 2020 *)
  • PARI
    {a(n) = eulerphi(n^n-1)/n}
Showing 1-10 of 12 results. Next