login
Number of prime pairs {2^n + (2k + 1), (2k + 1)*2^n + 1}, k < n.
1

%I #20 Dec 26 2017 13:43:58

%S 1,2,1,2,0,3,2,2,0,1,0,2,0,0,0,3,0,1,0,3,0,1,0,0,0,0,1,0,0,1,0,0,0,0,

%T 0,0,0,0,0,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,

%U 0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0

%N Number of prime pairs {2^n + (2k + 1), (2k + 1)*2^n + 1}, k < n.

%C If k = 0, then the two numbers in the "prime pair" are actually the same number, 2^n + 1 (which is either 2 or a Fermat prime; see A019434, A092506).

%H Antti Karttunen, <a href="/A238735/b238735.txt">Table of n, a(n) for n = 1..631</a>

%e a(1) = 1 because 2^1+(2*0+1)=3 and (2*0+1)*2^1+1=3 is prime pair for k=0,

%e a(2) = 2 because 2^2+(2*0+1)=5 and (2*0+1)*2^2+1=5 is prime pair for k=0, 2^2+(2*1+1)=7 and (2*1+1)*2^2+1=13 is prime pair for k=1,

%e a(3) = 1 because 2^3+(2*2+1)=13 and (2*2+1)*2^3+1=41 is prime pair for k=2.

%t a[n_] := Length@Select[Range[0, n-1], PrimeQ[2^n + (2*# + 1)] && PrimeQ[(2*# + 1)*2^n + 1] &]; Array[a, 100] (* _Giovanni Resta_, Mar 04 2014 *)

%o (PARI) a(n)=sum(k=0,n-1,isprime(2^n+2*k+1)&&isprime((2*k+1)<<n+1)) \\ _Charles R Greathouse IV_, Mar 06 2014

%Y Cf. A019434, A238554.

%K nonn

%O 1,2

%A _Ilya Lopatin_ and _Juri-Stepan Gerasimov_, Mar 04 2014

%E a(47)-a(87) from _Giovanni Resta_, Mar 04 2014