[go: up one dir, main page]

login
Difference between number of primes not exceeding reversed n and n.
1

%I #12 Mar 27 2020 20:10:21

%S 0,0,0,0,0,0,0,0,0,-4,0,3,5,7,9,12,13,15,16,-7,-3,0,2,4,6,9,11,13,14,

%T -8,-5,-2,0,3,5,7,9,11,12,-10,-7,-4,-3,0,2,4,6,8,9,-12,-9,-6,-5,-2,0,

%U 2,5,7,7,-14,-12,-9,-7,-4,-2,0,2,4,5,-15,-13,-11,-9,-6,-5,-2,0,2,3,-18,-15,-13,-11,-8,-7,-4,-2,0,1,-20,-16,-14,-12,-9,-7

%N Difference between number of primes not exceeding reversed n and n.

%H Michael De Vlieger, <a href="/A085655/b085655.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = pi(rev(n)) - pi(n).

%F a(n) = 0 for palindromic numbers.

%t Array[Subtract @@ PrimePi@ {IntegerReverse @#, #} &, 95] (* _Michael De Vlieger_, Mar 27 2020 *)

%o (PARI) a(n) = primepi(fromdigits(Vecrev(digits(n)))) - primepi(n); \\ _Michel Marcus_, Mar 27 2020

%Y Cf. A000720, A004086, A074719.

%K base,sign

%O 1,10

%A _Labos Elemer_, Jul 10 2003