OFFSET
1,1
COMMENTS
Any term with d digits is the concatenation of a prime digit and an earlier term (with d-1 digits).
The sequence is infinite since it contains subsequences b(n) = (10^n-1)/3+2 = (5,35,335,3335,...), c(n) = 23*10^n+b(n) = (235,2335,23335,...), d(n) = 3233*10^n+b(n), e(n) = 7233*10^n+b(n) etc.
FORMULA
For all n, a(n) == (5 mod 10).
For a(n) > 5, a(n) == 35 (mod 100).
For a(n) > 35, a(n) == 235 or 335 (mod 1000).
For a(n) > 335, a(n) == 2335 or 3335 (mod 10^4).
MATHEMATICA
Select[Range[5, 24000000, 5], And@@PrimeQ[IntegerDigits[#]]&& And@@ PrimeQ[ Take[ IntegerDigits[#^2], -(IntegerLength[#]+1)]]&] (* Harvey P. Dale, Dec 31 2012 *)
PROG
CROSSREFS
KEYWORD
base,easy,nice,nonn
AUTHOR
M. F. Hasler, Jan 23 2009
STATUS
approved