OFFSET
1,1
COMMENTS
All terms have 2-adic valuation equal to 1, i.e., they equal twice an odd (and squarefree) number, since the first digit in base two will always be "1". - M. F. Hasler, Mar 25 2011
2 appears at index n = 2^k for k >= 0, since such n_2 begins with "1" followed by k zeros, and 2^1 * 3^0 * ... * p_(k+1)^0 = 2. - Michael De Vlieger, Feb 28 2021
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
a(7) = 2*3*5 = 30. binary 7 = 111,
a(10) = 2^1*3^0*5^1*7^0 =10, binary(10) = 1010.
MATHEMATICA
Array[Times @@ Prime@ Flatten@ Position[#, 1] &@ IntegerDigits[#, 2] &, 61] (* Michael De Vlieger, Feb 28 2021 *)
PROG
(PARI) a(n)=factorback(Mat(vector(#n=binary(n), j, [prime(j), n[j]])~))
(PARI) a(n)=prod(j=1, #n=binary(n), prime(j)^n[j]) \\ M. F. Hasler, Mar 25 2011
(Haskell)
a110765 = product . zipWith (^) a000040_list . reverse . a030308_row
-- Reinhard Zumkeller, Aug 28 2014
(Python)
from sympy import prime
from operator import mul
from functools import reduce
def A110765(n):
return reduce(mul, (prime(i) for i, d in enumerate(bin(n)[2:], start=1) if int(d)))
# Chai Wah Wu, Sep 05 2014
(Python)
# implementation using recursion
from sympy import prime
def _A110765(n):
nlen = len(n)
return _A110765(n[:-1])*(prime(nlen) if int(n[-1]) else 1) if nlen > 1 else int(n) + 1
def A110765(n):
return _A110765(bin(n)[2:])
# Chai Wah Wu, Sep 05 2014
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, Aug 12 2005
EXTENSIONS
More terms from Stacy Hawthorne (shawtho1(AT)ashland.edu), Oct 31 2005
STATUS
approved