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.

A152014 Number of n-digit primes whose reversal is a different prime.

This page as a plain text file.
%I A152014 #12 Jun 28 2021 10:49:40
%S A152014 0,8,28,204,1406,9538,70474,535578,4192024,33619380,274890230,
%T A152014 2294771254
%N A152014 Number of n-digit primes whose reversal is a different prime.
%C A152014 All terms are even.
%e A152014 a(1)=0 because there are no 1-digit terms in A006567.
%e A152014 a(2)=8 because there are eight 2-digit terms in A006567: 13,17,31,37,71,73,79,97.
%t A152014 Do[c = 0; p = NextPrime[10^(n - 1) - 1]; n1 = PrimePi[p]; n2 = PrimePi[NextPrime[10^n, -1]] - n1 + 1; Do[id = IntegerDigits[p]; i1 = id[[1]]; If[OddQ[i1] && i1 != 5, p1 = FromDigits[ Reverse[id]]; If[p1 != p, If[PrimeQ[p1], c++ ]]]; p = NextPrime[p], {n2}]; Print[{n, c}], {n, 1, 9}];
%Y A152014 Cf. A006567.
%K A152014 more,nonn,base
%O A152014 1,2
%A A152014 _Zak Seidov_, Nov 19 2008
%E A152014 a(10)-a(11) from _Donovan Johnson_, Nov 01 2010
%E A152014 a(12) from _Lars Blomberg_, Jun 28 2021