login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A342943
Primes whose palindromization is a prime.
1
13, 19, 31, 37, 79, 103, 113, 127, 139, 163, 179, 181, 193, 199, 307, 353, 719, 727, 773, 787, 907, 937, 967, 983, 1093, 1117, 1123, 1129, 1153, 1163, 1193, 1201, 1303, 1327, 1409, 1447, 1489, 1579, 1583, 1597, 1609, 1657, 1777, 1823, 1831, 1879, 1951, 1987, 1993, 3001
OFFSET
1,1
COMMENTS
Palindromization is the function that extends the string representation of a number into a palindrome.
Even palindromization is the concatenation of a number and its reversal. Odd palindromization excludes the first digit of the reversal.
LINKS
MATHEMATICA
Select[Prime@Range[5, 500], Or@@(PrimeQ/@FromDigits/@(Join[a, Reverse@#]&/@{a=IntegerDigits@#, Most@a}))&] (* Giorgos Kalogeropoulos, Mar 30 2021 *)
plndrQ[n_]:=Module[{a=n 10^IntegerLength[n]+IntegerReverse[n], b=n 10^ (IntegerLength[ n]-1)+IntegerReverse[Floor[n/10]]}, AnyTrue[{a, b}, PrimeQ]]; Select[Prime[Range[5, 500]], plndrQ] (* Harvey P. Dale, Nov 20 2022 *)
PROG
(PARI) rev(x) = strjoin(Vecrev(Str(x)));
isok(p) = isprime(p) && (isprime(eval(Str(p, rev(p)))) || isprime(eval(Str(p, rev(p\10)))));
CROSSREFS
Sequence in context: A079130 A243587 A085413 * A244311 A358530 A164333
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Mar 30 2021
STATUS
approved