OFFSET
1,1
COMMENTS
No term has a digit 4, 6 or 8.
Subsequences of squares are listed in Crossrefs.
EXAMPLE
MATHEMATICA
p[n_] := If[n > 0, Prime[n], 0]; ppQ[n_] := GCD @@ FactorInteger[n][[;; , 2]] > 1; seq[ndigmax_] := Module[{t = Table[FromDigits[Flatten@ IntegerDigits@ (p /@ IntegerDigits[n])], {n, 0, 10^ndigmax - 1}]}, Union@ Select[t, 0 < # < 10^ndigmax && ppQ[#] &]]; seq[6] (* Amiram Eldar, Mar 26 2023 *)
PROG
(PARI) f(n) = if (n, fromdigits(concat(apply(d -> if (d, digits(prime(d)), [0]), digits(n)))), 0); \\ A329147
lista(nn) = my(list = List(), m); for (n=0, nn, m = f(n); if ((m <= nn) && ispower(m), listput(list, m)); ); vecsort(Set(list)); \\ Michel Marcus, Mar 26 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Mar 25 2023
STATUS
approved