OFFSET
1,1
COMMENTS
Lim inf a(n)/n^2 >= 2. Is it finite? - Charles R Greathouse IV, Apr 30 2013
LINKS
Christian N. K. Anderson, Table of n, a(n) for n = 1..10000
Christian N. K. Anderson, Table of n, a(n), sqrt(a(n)), all possible separations of a(n) into primes for n = 1...10000
EXAMPLE
25 = 5^2 and can be separated into two prime numbers: 2|5.
231361 = 481^2 and can be separated into prime numbers in six ways: 2|3|1361, 2|3|13|61, 2|31|3|61, 2|313|61, 23|1361, and 23|13|61.
Leading zeros are allowed: 2025 = 2|02|5.
MATHEMATICA
r[d_] := Catch@ Block[{z = Length@d}, z<1 || Do[ If[ PrimeQ@ FromDigits@ Take[d, i] && r@ Take[d, i-z], Throw@ True], {i, z}]]; Select[ Range[1000]^2, r@ IntegerDigits@ # &] (* Giovanni Resta, Apr 30 2013 *)
PROG
(R) library(gmp); isprime2=function(x) isprime(x)>0
splithasproperty<-function(n, FUN, curdig=1, res=list(), curspl=c()) {
no0<-function(s){ while(substr(s, 1, 1)=="0" & nchar(s)>1) s=substr(s, 2, nchar(s)); s}
s=as.character(n)
if(curdig>nchar(s)) return(res)
if(length(curspl)>0) if(FUN(as.bigz(no0(substr(s, curdig, nchar(s)))))) res[[length(res)+1]]=curspl
for(i in curdig:nchar(s))
if(FUN(as.bigz(no0(substr(s, curdig, i)))))
res=splithasproperty(n, FUN, i+1, res, c(curspl, i))
res
}
which(sapply(1:100, function(x) length(splithasproperty(x^2, isprime2)))>0)^2
(PARI) has(n)=if(isprime(n), return(1)); if(n<202, return(isprime(n%10) && isprime(n\10))); my(k=n%10, v); if(k==5||k==2, return(if(n<6, 1, n\=10; has(n/10^valuation(n, 10))))); if(k%2==0, return(0)); v=digits(n); for(i=1, #v, if(isprime(n%10^i) && has(n\10^i), return(1))); 0
forstep(n=5, 1e3, 2, if(has(n^2), print1(n^2", ")))
\\ Charles R Greathouse IV, Apr 30 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Kevin L. Schwartz and Christian N. K. Anderson, Apr 29 2013
STATUS
approved