%I #23 Jul 25 2023 07:34:13
%S -1,1,5,15,25,49,97,181,433,819,1541,3147,6271,12469,25087,49455,
%T 99255,196057,391815,781893,1555935,3106511,6191001,12351963,24658715,
%U 49173803,98136735,195868789,391110307,780774507,1559147549,3113261723,6218243597,12419791799,24808942497
%N a(n) = prime(2^(n+1)) - 2*prime(2^n).
%C The prime number theorem implies prime(n) ~ n log n, which explains that lim_{n->oo} A033844(n+1)/A033844(n) = 2. This motivated the present sequence, which has the same property again, e.g., a(46..55)~[1,2,4,8,16,32,64,128,256,512]*10^14. This can be proved by considering an asymptotic expression for prime(n) involving more terms, which yields a(n) = 2^n*(2*log(2)+2/n+O(1/n^2)).
%H M. F. Hasler, <a href="/A197072/b197072.txt">Table of n, a(n) for n = 0..55</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Prime_number_theorem#Approximations_for_the_nth_prime_number">Prime number theorem</a>.
%F a(n) ~ 2^(n+1)*(log(2) + 2/n + O(1/n^2)).
%F a(n) = A033844(n+1) - 2*A033844(n).
%o (PARI) a(n)=prime(2<<n)-2*prime(1<<n) /* works only up to "primelimit" */
%o (PARI) a(n)=A033844(n+1)-A033844(n)*2 /* if A033844 is a function */
%o (PARI) vector(#A033844-1,i,A033844[i+1]-A033844[i]*2) /* assuming A033844 is defined as a vector - note that indices then start at 1 while offset=0 */
%K sign
%O 0,3
%A _M. F. Hasler_, Oct 09 2011
|