login
Palindromes in A329150.
0

%I #26 Apr 06 2023 06:36:27

%S 0,2,3,5,7,11,22,33,55,77,202,222,232,252,272,303,313,323,333,353,373,

%T 505,525,535,555,575,707,717,727,737,757,777,1111,2002,2112,2222,2332,

%U 2552,2772,3003,3113,3223,3333,3553,3773,5005,5115,5225,5335,5555,5775,7007,7117

%N Palindromes in A329150.

%C If m is a palindrome with no digit greater than 5 in A118597, then A329147(m) is a term, but there exist terms that are not of this form as 313, 717, ...

%e 232 is a term which has two preimages since A329147(91) = A329147(121) = 232.

%e 313 = A329147(26) is a term whose preimage is not in A118597.

%e 2002 is a term since A329147(1001) = 2002.

%e 2112 is a term since A329147(151) = 2112.

%e 27172 = A329147(1471) is a term whose preimage is not in A118597.

%t 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 *)

%o (PARI) ispal(n) = my(d=digits(n)); d==Vecrev(d);

%o f(n) = if (n, fromdigits(concat(apply(d -> if (d, digits(prime(d)), [0]), digits(n)))), 0); \\ A329147

%o 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

%Y Intersection of A002113 and A329150.

%Y Cf. A118597, A329147, A361750, A361821.

%Y Subsequences: A002276, A002277, A002279, A002281, A099814.

%K nonn,base

%O 1,2

%A _Bernard Schott_, Mar 25 2023