login
a(n) = 2^(n-th prime).
38

%I #61 Aug 09 2024 15:14:37

%S 4,8,32,128,2048,8192,131072,524288,8388608,536870912,2147483648,

%T 137438953472,2199023255552,8796093022208,140737488355328,

%U 9007199254740992,576460752303423488,2305843009213693952

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

%C These are the "outputs" in Conway's PRIMEGAME (see A007542). - _Alonso del Arte_, Jan 03 2011

%C Multiplicative encoding of the n-th prime. - _Daniel Forgues_, Feb 26 2017

%H Vincenzo Librandi, <a href="/A034785/b034785.txt">Table of n, a(n) for n = 1..200</a>

%H <a href="/index/Di#divseq">Index to divisibility sequences</a>.

%F From _Amiram Eldar_, Aug 11 2020: (Start)

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

%F Sum_{n>=1} 1/a(n) = A051006. (End)

%F From _Amiram Eldar_, Nov 22 2022: (Start)

%F Product_{n>=1} (1 + 1/a(n)) = A184083.

%F Product_{n>=1} (1 - 1/a(n)) = A184082. (End)

%e a(4) = 128 because the fourth prime number is 7 and 2^7 = 128.

%t 2^Prime@Range@40 (* _Vladimir Joseph Stephan Orlovsky_, Apr 11 2011 *)

%o (Haskell)

%o a034785 = (2 ^) . a000040

%o -- _Reinhard Zumkeller_, Feb 07 2015, Jan 24 2012

%o (PARI) a(n)=1<<prime(n) \\ _Charles R Greathouse IV_, Apr 07 2012

%o (Magma) [2^p: p in PrimesUpTo(100)]; // _Vincenzo Librandi_, Apr 29 2014

%o (Python)

%o from sympy import prime

%o def A034785(n): return 1<<prime(n) # _Chai Wah Wu_, Aug 09 2024

%Y Cf. A000040, A000430, A051006, A073718 (2^(n-th composite)), A074736.

%Y Cf. A184082, A184083.

%K easy,nonn

%O 1,1

%A _Asher Auel_

%E More terms from _James A. Sellers_, Feb 04 2000