login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A225135
Squares that are a concatenation of primes.
2
25, 225, 289, 361, 529, 729, 2025, 2401, 2601, 2809, 3025, 4761, 5041, 5329, 5929, 7225, 7569, 11025, 11449, 11881, 13225, 15129, 19881, 20449, 21609, 22801, 23409, 24649, 25281, 26569, 27225, 29241, 29929, 31329, 32041, 32761, 34969, 36481, 39601, 47089
OFFSET
1,1
COMMENTS
Lim inf a(n)/n^2 >= 2. Is it finite? - Charles R Greathouse IV, Apr 30 2013
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
STATUS
approved