login
a(n) is the larger of the two factors whose product is A394991.
6

%I #21 Apr 12 2026 00:16:13

%S 1,3,6,14,30,62,117,217,467,979,1845,3897,7793,15985,31943,64711,

%T 129265,258529,520673,849583,2082753,4151813,8357825,13264529,

%U 33528945,66985857,134090689,268181377,536616833,1073496033,2146467585,4042815511,8587869953,17178943969

%N a(n) is the larger of the two factors whose product is A394991.

%C The factors may be equal, but no example for n>2 is known.

%e See A394987.

%o (Python)

%o from sympy.utilities.iterables import multiset_permutations

%o from sympy import divisors

%o def A395004(n):

%o a = 1<<n-1

%o b = a<<1

%o k = (n<<1)-1

%o c = (1<<k+1)-1

%o for l in range(k,0,-1):

%o for s in multiset_permutations('0'*l+'1'*(k+1-l)):

%o m = c-int(''.join(s),2)

%o for d in divisors(m):

%o if d**2>m:

%o break

%o if a<=d<b and a*d<=m<b*d:

%o return m//d # _Chai Wah Wu_, Apr 11 2026

%Y A395003 is the smaller factor.

%Y Cf. A029837, A394987, A394989, A394990, A394991.

%K nonn

%O 1,2

%A _Hugo Pfoertner_, Apr 09 2026

%E a(24)-a(34) from _Chai Wah Wu_, Apr 09 2026