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
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
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
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Feb 04 2000
STATUS
approved