OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..39 (all terms < 4*10^18)
EXAMPLE
529 = 23^2, and nextprime(23) = 29 is a substring of 529, so 529 is a term.
MATHEMATICA
Select[Range[2*10^6]^2, SequenceCount[IntegerDigits[#], IntegerDigits[ NextPrime[ Sqrt[ #]]]]>0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Jul 13 2016 *)
Select[Range[2*10^6], {} != StringPosition @@ ToString /@ {#^2, NextPrime@ #} &]^2] (* Giovanni Resta, Jul 15 2016 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Harvey P. Dale and N. J. A. Sloane, Jul 13 2016
STATUS
approved