OFFSET
1,4
COMMENTS
a(n) = the largest n-digit number of the form p^12 (p = prime), a(n) = 0 if no such number exists.
LINKS
Robert Israel, Table of n, a(n) for n = 1..999
MAPLE
f:= proc(n) local r;
r:= prevprime(ceil(10^(n/12)))^12;
if r < 10^(n-1) then 0 else r fi;
end proc:
f(1):= 0: f(2):= 0: f(3):=0:
map(f, [$1..30]); # Robert Israel, Apr 03 2019
PROG
(PARI) a(n) = my(r=precprime(ceil(10^(n/12))-1)^12); if(r < 10^(n-1), return(0)); r \\ Adapted from Robert Israel's Maple program; Felix Fröhlich, Apr 03 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Nov 27 2010
STATUS
approved