%I #30 Sep 24 2024 09:21:24
%S 2,2,6,2,10,6,30,2,14,10,70,6,42,30,210,2,22,14,154,10,110,70,770,6,
%T 66,42,462,30,330,210,2310,2,26,22,286,14,182,154,2002,10,130,110,
%U 1430,70,910,770,10010,6,78,66,858,42,546,462,6006,30,390,330,4290,210,2730
%N Let n in binary be a k-digit number say abbaaa... where a = 1 and b = 0. a(n) = 2^a*3^b*5^b*7*a... primes in increasing order raised to the powers starting from the MSB.
%C 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
%C 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
%H Reinhard Zumkeller, <a href="/A110765/b110765.txt">Table of n, a(n) for n = 1..10000</a>
%e a(7) = 2*3*5 = 30. binary 7 = 111,
%e a(10) = 2^1*3^0*5^1*7^0 =10, binary(10) = 1010.
%t Array[Times @@ Prime@ Flatten@ Position[#, 1] &@ IntegerDigits[#, 2] &, 61] (* _Michael De Vlieger_, Feb 28 2021 *)
%o (PARI) a(n)=factorback(Mat(vector(#n=binary(n),j,[prime(j),n[j]])~))
%o (PARI) a(n)=prod(j=1,#n=binary(n),prime(j)^n[j]) \\ _M. F. Hasler_, Mar 25 2011
%o (Haskell)
%o a110765 = product . zipWith (^) a000040_list . reverse . a030308_row
%o -- _Reinhard Zumkeller_, Aug 28 2014
%o (Python)
%o from sympy import prime
%o from operator import mul
%o from functools import reduce
%o def A110765(n):
%o return reduce(mul, (prime(i) for i,d in enumerate(bin(n)[2:],start=1) if int(d)))
%o # _Chai Wah Wu_, Sep 05 2014
%o (Python)
%o # implementation using recursion
%o from sympy import prime
%o def _A110765(n):
%o nlen = len(n)
%o return _A110765(n[:-1])*(prime(nlen) if int(n[-1]) else 1) if nlen > 1 else int(n) + 1
%o def A110765(n):
%o return _A110765(bin(n)[2:])
%o # _Chai Wah Wu_, Sep 05 2014
%Y Cf. A110766.
%Y Cf. A030308, A000040, A019565.
%K base,easy,nonn,look
%O 1,1
%A _Amarnath Murthy_, Aug 12 2005
%E More terms from Stacy Hawthorne (shawtho1(AT)ashland.edu), Oct 31 2005