%I #6 Dec 13 2015 11:11:31
%S 19,29,41,43,47,59,79,89,97,109,139,149,163,167,179,181,191,193,197,
%T 199,229,239,241,251,257,269,281,293,347,349,359,367,379,389,397,401,
%U 409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,509,541
%N Primes with a square > 1 as a substring.
%e 29, 163, 181 (resp.) contain 9=3^2, 16=4^2, 81=9^2 (resp.).
%t ssQ[n_]:=With[{i=IntegerDigits[n]},AnyTrue[Select[FromDigits/@ Flatten[ Table[ Partition[i,k,1],{k,Length[i]}],1],#>1&],IntegerQ[ Sqrt[ #]]&]]; Select[ Prime[ Range[100]],ssQ] (* The program uses the AnyTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Dec 13 2015 *)
%K base,nonn
%O 1,1
%A _Zak Seidov_, Jun 25 2005
|