%I #28 Jun 03 2019 15:02:33
%S 3,2,7,2,11,2,31,2,3,2,43,2,71,2,211,2,23,2,67,2,3,2,331,2,5,2,463,2,
%T 3,2,2311,2,3,2,79,2,131,2,17,2,3,2,547,2,911,2,2731,2,7,2,859,2,3,2,
%U 7,2,2003,2,6007,2,3,2,59,2,5,2,103,2,3,2,7,2,239
%N a(n) is the smallest prime factor of 1 + the product of primes indexed by the binary digits of n.
%H Chai Wah Wu, <a href="/A308439/b308439.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A020639(A019565(n) + 1). - _Michel Marcus_, Jun 02 2019
%e a(1) = a(01_2) = 2^1 * 3^0 + 1 = 3;
%e a(2) = a(10_2) = 2^0 * 3^1 + 1 = 2^2 = 2;
%e a(3) = a(11_2) = 2^1 * 3^1 + 1 = 7.
%o (PARI) a(n) = {my(b = binary(n), x = 1 + prod(k=1, #b, prime(#b-k+1)^b[k])); factor(x)[1,1];} \\ _Michel Marcus_, Jun 02 2019
%o (Python)
%o from functools import reduce
%o from operator import mul
%o from sympy import prime, primefactors
%o def A308439(n):
%o return min(primefactors(1 + reduce(mul,(prime(i+1) for i,j in enumerate(bin(n)[:1:-1]) if j == '1')))) # _Chai Wah Wu_, Jun 03 2019
%Y Cf. A000945, A019565, A020639.
%K nonn,base
%O 1,1
%A _Brendan Hickey_, May 27 2019