login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A034785
a(n) = 2^(n-th prime).
38
4, 8, 32, 128, 2048, 8192, 131072, 524288, 8388608, 536870912, 2147483648, 137438953472, 2199023255552, 8796093022208, 140737488355328, 9007199254740992, 576460752303423488, 2305843009213693952
OFFSET
1,1
COMMENTS
These are the "outputs" in Conway's PRIMEGAME (see A007542). - Alonso del Arte, Jan 03 2011
Multiplicative encoding of the n-th prime. - Daniel Forgues, Feb 26 2017
FORMULA
From Amiram Eldar, Aug 11 2020: (Start)
a(n) = 2^A000040(n).
Sum_{n>=1} 1/a(n) = A051006. (End)
From Amiram Eldar, Nov 22 2022: (Start)
Product_{n>=1} (1 + 1/a(n)) = A184083.
Product_{n>=1} (1 - 1/a(n)) = A184082. (End)
EXAMPLE
a(4) = 128 because the fourth prime number is 7 and 2^7 = 128.
MATHEMATICA
2^Prime@Range@40 (* Vladimir Joseph Stephan Orlovsky, Apr 11 2011 *)
PROG
(Haskell)
a034785 = (2 ^) . a000040
-- Reinhard Zumkeller, Feb 07 2015, Jan 24 2012
(PARI) a(n)=1<<prime(n) \\ Charles R Greathouse IV, Apr 07 2012
(Magma) [2^p: p in PrimesUpTo(100)]; // Vincenzo Librandi, Apr 29 2014
(Python)
from sympy import prime
def A034785(n): return 1<<prime(n) # Chai Wah Wu, Aug 09 2024
CROSSREFS
Cf. A000040, A000430, A051006, A073718 (2^(n-th composite)), A074736.
Sequence in context: A327493 A103970 A227295 * A247938 A072868 A075398
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Feb 04 2000
STATUS
approved