login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225944 Numbers k such that prime(k) divides k^k - 1. 2
1, 2, 5, 124, 181, 696, 261800, 3834909, 18836480, 51432542, 69709961, 332054520, 3140421767 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(14) > 10^12. - Giovanni Resta, May 11 2020
LINKS
MATHEMATICA
Select[Range[10^6], PowerMod[#, #, Prime@#] == 1 &] (* Giovanni Resta, May 23 2013 *)
PROG
(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,
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
CROSSREFS
Sequence in context: A294513 A276109 A270481 * A270588 A214648 A175978
KEYWORD
nonn,more
AUTHOR
Alex Ratushnyak, May 21 2013
EXTENSIONS
a(8)-a(13) from Giovanni Resta, May 23 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:08 EDT 2024. Contains 371794 sequences. (Running on oeis4.)