OFFSET
2,1
COMMENTS
It appears that a(n) = 3 for n>59. In other words, for n>59, 2 is always a substring of 3^n. Is there any proof? See A131625.
EXAMPLE
3701^2 = 13697401 and 3697 is the prime before 3701.
3^3 = 27 and 2 is the prime before 3.
43^4 = 3418801 and 41 is the prime before 43.
MAPLE
P:=proc(q) local a, b, h, k, n, ok; for h from 2 to q do ok:=1; for n from 1 to q do
if ok=1 then a:=ithprime(n); b:=prevprime(a); for k from 1 to ilog10(a^h)-ilog10(b)+1 do
if b=trunc(a^h/10^(k-1)) mod 10^(ilog10(b)+1) then print(a); ok:=0; break;
fi; od; fi; od; od; end: P(10^6);
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Paolo P. Lava, Feb 09 2018
STATUS
approved