OFFSET
1,1
COMMENTS
Obviously the first and last digits of p must have the same parity. - N. J. A. Sloane, May 16 2021, following a suggestion from Zak Seidov.
This explains that the sequence has a gap of ~ 10^k when a(n) reaches {2, 4, 6, 8}*10^k. Since this gap is larger than 0.5*a(n) at a(n) ~ 2*10^k, the average density #{a(n) < N} / N drops below 2/3 of its current value at these points (also when the denominator is replaced by primepi(N) ~ N/log(N) to consider the density within the primes), and therefore the sequence cannot have a positive asymptotic density, not even within the primes. - M. F. Hasler, May 17 2021
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..10000
EXAMPLE
11 reversed is 11, added is 22 + 1 is 23, a prime.
17 reversed is 71, added is 88 + 1 is 89, a prime.
From M. F. Hasler, May 17 2021: (Start)
Largest value below bounds of the form {2, 4, 6, 8, 10} * 10^k, k >= 1:
a(5) = 17, a(6) = 53, a(7) = 71,
a(13) = 191, a(16) = 389, a(20) = 587, a(25) = 773, a(30) = 983,
a(51) = 1931, a(65) = 3989, a(80) = 5987, a(99) = 7919, a(115) = 9803,
a(229) = 19997, a(357) = 39983, a(461) = 59981, a(563) = 79943, a(702) = 99833,
a(1733) = 199697, a(2682) = 399983, a(3588) = 599891, a(4392) = 799859, a(5502) = 999773,
a(11909) = 1999631, a(17477) = 3999707, a(23113) = 5999423, a(28293) = 7999463, a(34842) = 9999761,
a(89107) = 19999817, a(138827) = 39999803, a(188754) = 59999993, a(237211) = 79999769, a(298500) = 99999959,
a(678010) = 199999691, a(1031038) = 399999629, a(1380104) = 599999723, a(1714703) = 799999721, a(2147572) = 999999587, a(5467310) = 1999999829, ... (End)
MAPLE
q:= n-> (s-> andmap(isprime, [n, n+1+parse(
cat(seq(s[-i], i=1..length(s))))]))(""||n):
select(q, [$1..4000])[]; # Alois P. Heinz, Mar 07 2020
MATHEMATICA
Select[Prime[Range[10^5]], PrimeQ[# + IntegerReverse[#] + 1]&] (* Jean-François Alcover, May 18 2021 *)
PROG
(PARI) isok(p) = isprime(p) && isprime(p+fromdigits(Vecrev(digits(p)))+1); \\ Michel Marcus, Mar 07 2020
(PARI) /* To compute the sequence efficiently, scan only primes (=> isprime(p) not needed) and skip ranges with even initial digit (=> forprime() not possible). */ {A=List(); my(L=20, p=1, s, is(p)=isprime(p+fromdigits(Vecrev(digits(p)))+1)); while( p=nextprime(p+1), is(p) && listput(A, p); p<L || printf("a(%d) = %d, ", #A, A[#A]) || L += (s=10^logint(L, 10)) << (L\s>1 && p=L+s))} \\ M. F. Hasler, May 17 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paul Wright, Mar 07 2020
EXTENSIONS
Corrected and extended by N. J. A. Sloane, Mar 07 2020
STATUS
approved