OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..672
EXAMPLE
a(3) = 240111 because 240111 = 3^3 * 8893 with 8893 prime and 240111 ends with three 1's.
a(12) = 10630644111111111111, not 3721911111111111111, because although 3721911111111111111 = 3^12 * 7003432386871 with 7003432386871 prime, 3721911111111111111 ends in 14 1's rather than just 12.
MAPLE
f:= proc(n) local x0, p;
x0:= -(1-10^(-n))/9 mod 3^n;
for p from x0*10^n+(10^n-1)/9 by 30^n do if isprime(p/3^n) and p mod 10^(n+1) <> (10^(n+1)-1)/9 then return p fi od
end proc;
map(f, [$0..20]);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Oct 01 2024
STATUS
approved