OFFSET
1,2
COMMENTS
For each integer r >= 3 the sequence contains 10^r + 1.
All terms > 9001 end in 0001 (e.g., 10001), 0625 (e.g., 390625), 1249 (e.g., 781249), 8751 (e.g., 18751), 9376 (e.g., 69376), and possibly in 4193, 7057, or 9375.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..351 (* All terms up to 20 million *)
FORMULA
For all terms m, m^m == m (mod 10^(floor(log_10(m)) + 3)).
EXAMPLE
751 is a term since 751 is a 3-digit number and 751^751 == 500751 (mod 10^6) and thus 751^751 == 751 (mod 10^(3 + 2)).
MATHEMATICA
Select[Range[200000], PowerMod[#, #, 10^(IntegerLength[#]+2)]==#&] (* Harvey P. Dale, Dec 05 2024 *)
PROG
(PARI) for (len_m = 1, 5, for (m = 10^(len_m - 1), 10^len_m - 1, if (m == Mod(m, 10^(len_m + 1))^m, print1(m, ", "))));
(Python)
from itertools import count
def A373206_gen(): # generator of terms
yield from (1, 751, 1001, 2001, 2751, 3001, 4001, 5001, 5376, 6001, 6751, 7001, 8001, 9001)
for i in count(10000, 10000):
for j in (1, 625, 1249, 4193, 7057, 8751, 9375, 9376):
m = i+j
if pow(m, m, 100*10**(len(str(m)))) == m:
yield m
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marco Ripà, May 28 2024
STATUS
approved