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

A126703
Numbers k whose last k digits of k^k form a prime number.
1
143, 433, 1687, 3283, 14949
OFFSET
1,1
COMMENTS
a(6) > 10^5. - Michael S. Branicky, Sep 28 2024
MATHEMATICA
f[n_] := FromDigits[Take[IntegerDigits[n^n], -n]]; Do[If[PrimeQ[f[n]], Print[n]], {n, 8, 14949}] (* Ryan Propper, Apr 01 2007 *)
PROG
(Python)
from sympy import isprime
A126703_list = [n for n in range(1, 2000) if isprime(pow(n, n, 10**n))] # Chai Wah Wu, Mar 23 2018
CROSSREFS
Indices of primes in A086756.
Sequence in context: A261074 A213337 A156963 * A111185 A074301 A156635
KEYWORD
base,hard,more,nonn
AUTHOR
Shyam Sunder Gupta, Feb 11 2007
EXTENSIONS
a(5) from Ryan Propper, Apr 01 2007
STATUS
approved