cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A257636 Numbers n such that the base 10 reversals of n and n+1 are both prime.

This page as a plain text file.
%I A257636 #15 Jan 07 2024 15:26:43
%S A257636 2,13,16,30,31,34,37,70,73,91,97,106,112,118,124,130,133,145,151,166,
%T A257636 181,199,300,310,346,358,361,364,370,376,382,388,391,700,709,721,727,
%U A257636 730,739,745,751,754,757,760,763,775,778,784,787,790,904,907,916,919
%N A257636 Numbers n such that the base 10 reversals of n and n+1 are both prime.
%C A257636 n such that n and n+1 are in A095179.
%C A257636 Leading 0's in the reversals are allowed.
%C A257636 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.
%C A257636 All terms == 1 (mod 3) except for 2 and 3*10^k where k is in A049054.
%H A257636 Robert Israel, <a href="/A257636/b257636.txt">Table of n, a(n) for n = 1..10000</a>
%H A257636 Math StackExchange, <a href="http://math.stackexchange.com/questions/1513275/consecutive-numbers-where-their-revers-numbers-are-primes/1513381#1513381">Consecutive numbers where their revers numbers are primes</a>
%e A257636 13 is in the sequence because both 31 and 41 are prime.
%p A257636 revdigs:= proc(n) option remember; local x;
%p A257636    x:= n mod 10;
%p A257636    x*10^ilog10(n)+revdigs((n-x)/10);
%p A257636 end proc:
%p A257636 for i from 0 to 9 do revdigs(i):= i od:
%p A257636 Rprimes:= select(isprime@revdigs, [$1..10^4]):
%p A257636 Rprimes[select(t -> Rprimes[t+1]-Rprimes[t]=1, [$1..nops(Rprimes)-1])]; # _Robert Israel_, Nov 04 2015
%t A257636 SequencePosition[Table[If[PrimeQ[IntegerReverse[n]],1,0],{n,1000}],{1,1}][[;;,1]] (* _Harvey P. Dale_, Jan 07 2024 *)
%o A257636 (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
%Y A257636 Cf. A000040, A004086, A049054, A095179.
%K A257636 nonn,base
%O A257636 1,1
%A A257636 _Robert Israel_, Nov 04 2015