login
a(n) = number of primes p, p <= 2^n, where 2^n + p is composite.
1

%I #12 Feb 20 2023 14:49:08

%S 0,1,1,2,3,8,13,22,43,79,140,258,480,877,1646,3083,5788,10940,20623,

%T 39191,74441,141826,270992,518323,993869,1910174,3674150,7078905,

%U 13654626,26375091,51007193,98748888,191381911

%N a(n) = number of primes p, p <= 2^n, where 2^n + p is composite.

%C Terms through a(18) calculated by _M. F. Hasler_.

%F a(n) = A007053(n) - A175147(n).

%o (Python)

%o from sympy import isprime, primerange

%o def a(n):

%o t = 2**n

%o return sum(1 for p in primerange(2, t+1) if not isprime(t + p))

%o print([a(n) for n in range(20)]) # _Michael S. Branicky_, Feb 20 2023

%Y Cf. A007053, A175147.

%K more,nonn

%O 0,4

%A _Leroy Quet_, Feb 24 2010

%E a(19)-a(32) from _Ray Chandler_, Mar 05 2010