OFFSET
1,1
COMMENTS
From k = 1 to 9, A329147(k) has more than one preimage only for k = 9 since A329147(9) = A329147(12) = 23; so, all terms of this sequence have in their decimal expansion the two-digit integer '23'; it follows that when || denotes concatenation, the terms of this sequence are of the form:
X||23 as 223, 323, 523, 723, 1123, 1323, 1723, 1923, 2023, 2223, ... or,
23||Y as 230, 232, 233, 235, 237, 2300, 2302, 2303, 2305, 2307, 2311, ... or,
X||23||Y as 2230, 2232, 2233, 2235, 2237, 3230, 3232, 3233, ...
Every term of this sequence has 2^q preimages, and the smallest terms with exactly 2^q preimages for q >= 1 are 23, 2323, 232323, ... with q times the 2-digit number 23 in its decimal expansion; hence, the 8 preimages of 232323 are 999, 9912, 9129, 91212, 1299, 12912, 12129 and 121212.
EXAMPLE
MATHEMATICA
p[n_] := If[n > 0, Prime[n], 0]; seq[ndigmax_] := Module[{t = Table[FromDigits[ Flatten @ IntegerDigits @ (p /@ IntegerDigits[n]) ], {n, 1, 10^ndigmax - 1}]}, Sort @ Select[Tally[t], First[#] < 10^ndigmax && Last[#] > 1 &][[;; , 1]]]; seq[4] (* Amiram Eldar, Mar 23 2023 *)
PROG
(PARI) f(n) = if (n, fromdigits(concat(apply(d -> if (d, digits(prime(d)), [0]), digits(n)))), 0); \\ A329147
lista(nn) = {my(map = Map()); for (n=1, nn, my(m = f(n)); if (mapisdefined(map, m), mapput(map, m, 1+mapget(map, m)), mapput(map, m, 0)); ); my(list = List()); for (n=1, nn, if (mapisdefined(map, n), my(v = mapget(map, n)); if (#v > 0, listput(list, n)); ); ); Vec(list); } \\ Michel Marcus, Mar 24 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Mar 23 2023
STATUS
approved