OFFSET
1,1
LINKS
Christian N. K. Anderson, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 27 because removing the leftmost digit gives 7, a prime.
a(8) = 50653 because removing the leftmost digit gives 0653 = 653, which is prime.
a(21) = 5000211 because removing the leftmost digit gives 000211 = 00211 = 0211 = 211, which is prime.
PROG
(R) library(gmp); no0<-function(s){ while(substr(s, 1, 1)=="0" & nchar(s)>1) s=substr(s, 2, nchar(s)); s}; trimL=function(x) { x=as.character(x); ifelse(nchar(x)<2, 0, no0(substr(x, 2, nchar(x)))) }; y=as.bigz(rep(0, 10000)); len=0; n=as.bigz(-1); while(len<10000) if(isprime(trimL((n=n+1)^3))) {y[(len=len+1)]=n^3; if(len%%100==0) cat(len, as.character(y[len]), "\n") }
(PARI) for(n=3, 1e3, t=Vec(Str(n^3)); if(isprime(eval(concat(t[2..#t]))), print1(n^3", "))) \\ Charles R Greathouse IV, Jun 10 2013
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Jonathan Vos Post, May 25 2013
STATUS
approved