OFFSET
1,1
COMMENTS
"Reverse concatenation" here refers to the decimal concatenation R(a(n)) || R(a(n-1)) || ... || R(a(3)) || R(a(2)) || R(a(1)) where R(k) means "reverse digits of k".
LINKS
J.W.L. (Jan) Eerland, Table of n, a(n) for n = 1..982
MATHEMATICA
w={7}; Do[k=1; q=Monitor[Parallelize[While[True, If[PrimeQ[FromDigits[Join@@IntegerDigits/@Reverse[IntegerDigits[FromDigits[Join@@IntegerDigits/@Append[w, Prime[k]]]]]]], Break[]]; k++]; Prime[k]], k]; w=Append[w, q], {i, 2, 50}]; w
PROG
(Python)
from itertools import count, islice
from gmpy2 import digits, is_prime, mpz, next_prime
def agen(): # generator of terms
r, an = "", 7
while True:
yield int(an)
r = digits(an)[::-1] + r
p = 2
while not is_prime(mpz(digits(p)[::-1]+r)): p = next_prime(p)
an = p
print(list(islice(agen(), 50))) # after Michael S. Branicky in A379355
CROSSREFS
KEYWORD
base,nonn
AUTHOR
J.W.L. (Jan) Eerland, Jan 09 2025
STATUS
approved