login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A225945
Numbers k such that prime(k) divides k^k + 1.
1
1, 6, 60, 136, 124796, 3919272, 18363918, 153037808, 965108649, 3140421892, 5961162423, 20437804784
OFFSET
1,2
COMMENTS
a(12) > 2*10^10. - Giovanni Resta, May 23 2013
MATHEMATICA
Select[Range[10^6], (p = Prime[#]; PowerMod[#, #, p] == p - 1) &] (* Giovanni Resta, May 23 2013 *)
PROG
(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) == pn - 1:
yield n
pn = nextprime(pn)
print(list(islice(agen(), 5))) # Michael S. Branicky, May 25 2023
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Alex Ratushnyak, May 21 2013
EXTENSIONS
a(6)-a(11) from Giovanni Resta, May 23 2013
a(12) from Michael S. Branicky, May 25 2023
STATUS
approved