login
Smallest prime >= 2^n.
34

%I #58 Sep 01 2024 10:25:24

%S 2,2,5,11,17,37,67,131,257,521,1031,2053,4099,8209,16411,32771,65537,

%T 131101,262147,524309,1048583,2097169,4194319,8388617,16777259,

%U 33554467,67108879,134217757,268435459,536870923,1073741827,2147483659

%N Smallest prime >= 2^n.

%H Jinyuan Wang, <a href="/A104080/b104080.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = A014210(n), n <> 1. - _R. J. Mathar_, Oct 14 2008

%F Sum_{n >= 0} 1/a(n) = A338475 + 1/6 = 1.4070738... (because 1/6 = 1/2 - 1/3). - _Bernard Schott_, Nov 01 2020

%F From _Gus Wiseman_, Jun 03 2024: (Start)

%F a(n) = A007918(2^n).

%F a(n) = 2^n + A092131(n).

%F a(n) = prime(A372684(n)).

%F (End)

%t Join[{2,2},NextPrime[#]&/@(2^Range[2,40])] (* _Harvey P. Dale_, Jan 26 2011 *)

%t NextPrime[2^Range[0,50]-1] (* _Vladimir Joseph Stephan Orlovsky_, Apr 11 2011 *)

%o (PARI) g(n,b=2) = for(x=0,n,print1(nextprime(b^x)","))

%o (PARI) a(n) = nextprime(2^n); \\ _Michel Marcus_, Nov 01 2020

%Y Cf. A104081, A338475.

%Y Except initial terms and offset, same as A014210 and A203074.

%Y The opposite (greatest prime <= 2^n) is A014234, indices A007053.

%Y The distance from 2^n is A092131, opposite A013603.

%Y Counting zeros instead of both bits gives A372474, cf. A035103, A211997.

%Y Counting ones instead of both bits gives A372517, cf. A014499, A061712.

%Y For squarefree instead of prime we have A372683, cf. A143658, A372540.

%Y The indices of these prime are given by A372684.

%Y Cf. A007918, A007920, A029837, A035100, A049095, A130739.

%K easy,nonn

%O 0,1

%A _Cino Hilliard_, Mar 03 2005