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-1 of 1 results.

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
Showing 1-1 of 1 results.