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.

Previous Showing 11-20 of 23 results. Next

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

A184966 Numbers k such that k^k - 1 is squarefree.

Original entry on oeis.org

2, 3, 4, 6, 7, 11, 12, 14, 15, 16, 20, 22, 23, 27, 31, 34, 35, 36, 38, 39, 42, 43, 47, 52, 56, 58, 59, 60, 63, 66, 67, 70, 71, 72, 75, 78, 79, 83, 84, 86, 87, 88, 90, 92, 94, 95, 96, 102, 103, 104, 106, 107, 108, 110, 111, 112, 114, 115, 119, 123, 128, 131, 135, 138
Offset: 1

Views

Author

Keywords

Comments

3^3 - 1 = 26 = 2 * 13.
4^4 - 1 = 255 = 3 * 5 * 17.
6^6 - 1 = 46655 = 5 * 7 * 31 * 43.

Crossrefs

Programs

  • Mathematica
    Select[Range@43, SquareFreeQ[#^# - 1] &]
  • PARI
    isok(k) = issquarefree(k^k-1); \\ Michel Marcus, Feb 22 2021

Extensions

a(23)-a(64) from Amiram Eldar, Feb 22 2021

A366821 a(n) is phi(n^n-1) where phi is the Euler totient function.

Original entry on oeis.org

2, 12, 128, 1400, 30240, 264992, 6635520, 141087744, 5890320000, 114117380608, 4662793175040, 99053063903040, 5470524984113280, 167080949856000000, 9208981628670443520, 413582117375670921216, 29531731481729468006400, 659473218553437863041320
Offset: 2

Views

Author

Sean A. Irvine, Oct 24 2023

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> numtheory[phi](n^n-1):
    seq(a(n), n=2..20);  # Alois P. Heinz, Oct 26 2023
  • Mathematica
    Array[EulerPhi[#^# - 1] &, 18, 2] (* Michael De Vlieger, Oct 24 2023 *)
  • PARI
    a(n) = eulerphi(n^n-1);

Formula

a(n) = A000010(A048861(n)).

A117812 a(n) = n^(2*n) - 1.

Original entry on oeis.org

0, 0, 15, 728, 65535, 9765624, 2176782335, 678223072848, 281474976710655, 150094635296999120, 99999999999999999999, 81402749386839761113320, 79496847203390844133441535, 91733330193268616658399616008, 123476695691247935826229781856255
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 17 2006

Keywords

Comments

a(n) = A048861(n)*A014566(n) = A062206(n) - 1.

Crossrefs

Programs

A125556 Smallest prime p = n*m + 1 that divides m^m - 1 for some m > 1.

Original entry on oeis.org

3, 11, 61, 13, 31, 241, 43, 257, 271, 251, 1013, 673, 157, 71, 541, 241, 307, 883, 4409, 401, 1471, 463, 5843, 577, 601, 2081, 271, 757, 1973, 241, 2729, 2657, 4951, 1123, 21701, 937, 32191, 14479, 3433, 641, 1723, 2521, 5849, 6689, 1531, 6257, 18143
Offset: 1

Views

Author

Alexander Adamchuk, Jan 22 2007

Keywords

Comments

Corresponding numbers m > 1 such that a(n) divides m^m - 1 are m = (a(n) - 1)/n = {2,5,20,3,6,40,6,32,30,25,92,56,12,5,36,15,18,...}.

Crossrefs

Cf. A048861 (n^n - 1).

Programs

  • PARI
    a(n) = forprime(p=3, , if (!((p-1) % n) && (m = (p-1)/n) && (m > 1) && !((m^m-1) % p), return (p));); \\ Michel Marcus, Nov 18 2017

Extensions

Corrected a(47) and extended by Alexander Adamchuk, May 09 2010

A225944 Numbers k such that prime(k) divides k^k - 1.

Original entry on oeis.org

1, 2, 5, 124, 181, 696, 261800, 3834909, 18836480, 51432542, 69709961, 332054520, 3140421767
Offset: 1

Views

Author

Alex Ratushnyak, May 21 2013

Keywords

Comments

a(14) > 10^12. - Giovanni Resta, May 11 2020

Crossrefs

Programs

  • Mathematica
    Select[Range[10^6], PowerMod[#, #, Prime@#] == 1 &] (* Giovanni Resta, May 23 2013 *)
  • Python
    primes = []
    n = 0
    def addPrime(k):
      global n
      for p in primes:
        if k%p==0:  return
        if p*p > k:  break
      primes.append(k)
      n += 1
      if (n**n-1) % k == 0: print(n, end=", ")
    addPrime(2)
    addPrime(3)
    for i in range(5, 10000000, 6):
      addPrime(i)
      addPrime(i+2)
    
  • Python
    from sympy import nextprime, prime
    from itertools import count, islice
    def agen(startn=1): # generator of terms
        pn = prime(startn)
        for n in count(startn):
            if pow(n, n, pn) == 1:
                yield n
            pn = nextprime(pn)
    print(list(islice(agen(), 7))) # Michael S. Branicky, May 25 2023

Extensions

a(8)-a(13) from Giovanni Resta, May 23 2013

A342930 Least positive number k such that n^n divides k*(k+1)/2.

Original entry on oeis.org

1, 7, 26, 511, 3124, 16767, 823542, 33554431, 387420488, 1787109375, 285311670610, 6737830608896, 302875106592252, 10190301669556224, 12913848876953124, 36893488147419103231, 827240261886336764176, 22831345258932427292672, 1978419655660313589123978, 35357007743740081787109375
Offset: 1

Views

Author

Seiichi Manyama, Mar 29 2021

Keywords

Examples

			  n |     a(n) |         T(a(n)) = n^n * A342931(n).
----+----------+------------------------------------
  1 |        1 |               1 = 1^1 * 1.
  2 |        7 |              28 = 2^2 * 7.
  3 |       26 |             351 = 3^3 * 13.
  4 |      511 |          130816 = 4^4 * 511.
  5 |     3124 |         4881250 = 5^5 * 1562.
  6 |    16767 |       140574528 = 6^6 * 3013.
  7 |   823542 |    339111124653 = 7^7 * 411771.
  8 | 33554431 | 562949936644096 = 8^8 * 33554431.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k=1, m=n^n); while(k*(k+1)/2%m!=0, k++); k;
    
  • PARI
    a(n) = { my(p = 2*n^n, f = factor(p), res = oo); for(i = 2^(#f~-1), 2^#f~-1, b = binary(i); pr = prod(j = 1, #f~, f[j,1]^(b[j]*f[j, 2])); ipr = p/pr; for(j = -1, 0, c = lift(chinese(Mod(-1-j, ipr), Mod(j, pr))); if(c > 0, res = min(res, c)))); res } \\ David A. Corneth, Mar 29 2021

Formula

a(p) = p^p - 1 for odd prime p. - David A. Corneth, Mar 29 2021

Extensions

More terms from David A. Corneth, Mar 29 2021

A077098 Length of period of the continued fraction expansion of sqrt(-1+n^n).

Original entry on oeis.org

2, 1, 2, 10, 2, 26, 2, 2, 2, 84531, 2, 531160, 2, 4738, 2, 3482830482, 2, 428195747108, 2
Offset: 2

Views

Author

Labos Elemer, Nov 05 2002

Keywords

Comments

If a(n) = 2 then (n^n - 1) is in A013642. - Bernard Schott, Sep 25 2019

Crossrefs

Programs

  • Mathematica
    Table[Length[Part[ContinuedFraction[Sqrt[ -1+u^u]], 2]], {u, 2, 15}]

Formula

a(n) = A003285(A048861(n)). - Michel Marcus, Sep 27 2019

Extensions

a(17)-a(18) from Chai Wah Wu, Sep 24 2019
a(19)-a(20) from Chai Wah Wu, Sep 27 2019

A104132 Largest prime factor of pip(n)^pip(n)-1 where pip(n) is the n-th prime-indexed prime.

Original entry on oeis.org

13, 71, 1806113, 2699538733, 568972471024107865287021434301977158534824481, 5926187589691497537793497756719
Offset: 1

Views

Author

Cino Hilliard, Mar 06 2005

Keywords

Crossrefs

Programs

  • Mathematica
    lpf[n_]:=Module[{p=Prime[Prime[n]]},FactorInteger[p^p-1][[-1,1]]]; Array[lpf,6] (* Harvey P. Dale, Nov 09 2017 *)
  • PARI
    piptopipm1(n) = { local(x, y); for(x=1, n, y=pip(x)^pip(x)-1; print1(bdiv(y)", "); ) }
    pip(n) = { return(prime(prime(n))) }
    bdiv(n) = { local(x); x=ifactor(n); return(x[length(x)]) }
    ifactor(n, m=0) = { local(f, j, k, flist); flist=[]; f=Vec(factor(n, m)); for(j=1, length(f[1]), for(k = 1, f[2][j], flist = concat(flist, f[1][j]) ); ); return(flist) }

Formula

a(n) = A006530(A048861(A006450(n))). - Amiram Eldar, May 23 2020

Extensions

a(6) corrected by Harvey P. Dale, Nov 09 2017

A128542 a(n) = ((2n)^(2n) - 1)/((2n+1)*(2n-1)).

Original entry on oeis.org

0, 1, 17, 1333, 266305, 101010101, 62350352785, 56984650387477, 72340172838076673, 121815504877079063701, 262801002506265664160401, 706890015246831381773595701, 2319540481478754999041880822337, 9120177155862455275254332279111413
Offset: 0

Views

Author

Alexander Adamchuk, May 08 2007

Keywords

Comments

p divides a(p-1) for prime p>3.

Crossrefs

Cf. A048861 = n^n - 1.

Programs

  • GAP
    Concatenation([0], List([1..20], n-> ((2*n)^(2*n)-1)/(4*n^2 -1) )); # G. C. Greubel, Jul 11 2019
  • Magma
    [0] cat [((2*n)^(2*n)-1)/(4*n^2 -1): n in [1..20]]; // G. C. Greubel, Jul 11 2019
    
  • Mathematica
    Join[{0}, Table[((2n)^(2n)-1)/(4n^2-1),{n,1,20}]]
  • PARI
    A128542(n)=((n+=n)^n-1)/(n^2-1) \\ M. F. Hasler, Oct 31 2014
    
  • Sage
    [0]+[((2*n)^(2*n)-1)/(4*n^2 -1) for n in (1..20)] # G. C. Greubel, Jul 11 2019
    

Formula

a(n) = ((2n)^(2n)-1)/((2n+1)*(2n-1)).
a(n) = A048861(2n)/((2n+1)*(2n-1)).
a(n) = A023037(2n)/(2n+1).
a(n) = A089815(2n-2).

Extensions

a(0)=0 added by M. F. Hasler, Oct 31 2014
Previous Showing 11-20 of 23 results. Next