login
a(n) = prime(2^n + 2) - prime(2^n + 1) - 1.
0

%I #18 Dec 30 2021 19:44:15

%S 1,1,5,1,1,3,5,5,3,3,9,11,5,21,1,3,23,1,31,15,17,17,15,91,9,13,9,41,

%T 43,7,97,69,7,35,7,23,5,19,63,5,35,25,21,29,29,9,117,29,3,85,119,35,

%U 37,127,9,51,5,9,47,33,49,83,83,19,41,5,17,95,3,29,29,401,25,143,19,27,65,57

%N a(n) = prime(2^n + 2) - prime(2^n + 1) - 1.

%C Total sum of the second differences of the primes (A036263) to 2^n.

%H Marek Wolf, <a href="https://pdfs.semanticscholar.org/78a1/7349819304863ae061df88dbcb26b4908f03.pdf">Some conjectures on the gaps between consecutive primes</a>

%t a[n_] := Prime[2^n+2]-Prime[2^n+1]-1; a/@Range[26]

%o (Python)

%o from sympy import nextprime, prime

%o def a(n): p = prime(2**n + 1); return nextprime(p) - p - 1

%o print([a(n) for n in range(1, 25)]) # _Michael S. Branicky_, Dec 27 2021

%Y Cf. A036263, A033844.

%K nonn

%O 1,3

%A _Robert G. Wilson v_, Aug 15 2002

%E a(42)-a(47) from _Michael S. Branicky_, Dec 27 2021

%E a(48)-a(78) from _Michael S. Branicky_, Dec 30 2021 using A033844