OFFSET
1,1
COMMENTS
n such that n and n+1 are in A095179.
Leading 0's in the reversals are allowed.
Heuristically, the abundance of these numbers should be roughly similar to that of the twin primes. Thus the sequence should be infinite but the sum of the reciprocals should converge.
All terms == 1 (mod 3) except for 2 and 3*10^k where k is in A049054.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Math StackExchange, Consecutive numbers where their revers numbers are primes
EXAMPLE
13 is in the sequence because both 31 and 41 are prime.
MAPLE
revdigs:= proc(n) option remember; local x;
x:= n mod 10;
x*10^ilog10(n)+revdigs((n-x)/10);
end proc:
for i from 0 to 9 do revdigs(i):= i od:
Rprimes:= select(isprime@revdigs, [$1..10^4]):
Rprimes[select(t -> Rprimes[t+1]-Rprimes[t]=1, [$1..nops(Rprimes)-1])]; # Robert Israel, Nov 04 2015
MATHEMATICA
SequencePosition[Table[If[PrimeQ[IntegerReverse[n]], 1, 0], {n, 1000}], {1, 1}][[;; , 1]] (* Harvey P. Dale, Jan 07 2024 *)
PROG
(PARI) for(n=1, 1e3, if(isprime(eval(concat(Vecrev(Str(n))))) && isprime(eval(concat(Vecrev(Str(n+1))))), print1(n, ", "))) \\ Altug Alkan, Nov 04 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Nov 04 2015
STATUS
approved