OFFSET
1,2
COMMENTS
EXAMPLE
MATHEMATICA
p[n_] := If[n > 0, Prime[n], 0]; seq[ndigmax_] := Module[{t = Table[FromDigits[ Flatten@ IntegerDigits@ (p /@ IntegerDigits[n])], {n, 0, 10^ndigmax - 1}]}, Union@ Select[t, # < 10^ndigmax && PalindromeQ[#] &]]; seq[4] (* Amiram Eldar, Mar 26 2023 *)
PROG
(PARI) ispal(n) = my(d=digits(n)); d==Vecrev(d);
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) && ispal(m), listput(list, m)); ); vecsort(Set(list)); \\ Michel Marcus, Mar 26 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Mar 25 2023
STATUS
approved