login
A392264
a(n) is the least prime p such that n + p is the digit reversal of a prime.
3
2, 3, 2, 3, 2, 5, 7, 3, 2, 3, 2, 2, 3, 2, 2, 19, 17, 13, 13, 11, 11, 13, 11, 7, 7, 5, 5, 3, 2, 2, 3, 2, 2, 3, 2, 2, 37, 41, 37, 31, 71, 29, 31, 29, 29, 61, 29, 23, 43, 23, 23, 19, 23, 17, 19, 17, 17, 13, 17, 11, 13, 11, 11, 7, 11, 5, 7, 3, 2, 3, 2, 2, 3, 2, 17, 3, 2, 13, 13, 11, 11, 13, 23, 7, 7
OFFSET
1,1
COMMENTS
Trailing zeros in n + p are not allowed.
LINKS
EXAMPLE
a(16) = 19 because 19 is a prime, the reversal of 16 + 19 = 35 is 53, which is prime, and no prime < 19 works.
MAPLE
rev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
f:= proc(n) local p, v;
p:= 1:
do
p:= nextprime(p);
v:= n+p;
if v mod 10 = 0 then next fi;
v:= rev(v);
if isprime(v) then return p fi
od
end proc:
map(f, [$1..100]);
MATHEMATICA
A392264[n_] := NestWhile[NextPrime, 2, !(Mod[n + #, 10] > 0 && PrimeQ[IntegerReverse[n + #]]) &];
Array[A392264, 100] (* Paolo Xausa, Feb 14 2026 *)
PROG
(PARI) a(n) = my(p=2); while (!(((n+p)%10) && isprime(fromdigits(Vecrev(digits(n+p))))), p=nextprime(p+1)); p; \\ Michel Marcus, Feb 09 2026
CROSSREFS
Cf. A393287.
Sequence in context: A282691 A346744 A265577 * A251103 A065559 A087317
KEYWORD
nonn,base
AUTHOR
Robert Israel, Feb 09 2026
STATUS
approved