login
Partial products of A006257.
0

%I #46 Sep 19 2024 18:48:37

%S 1,1,3,3,9,45,315,315,945,4725,33075,297675,3274425,42567525,

%T 638512875,638512875,1915538625,9577693125,67043851875,603394666875,

%U 6637341335625,86285437363125,1294281560446875,22002786527596875,418052944024340625,8779111824511153125,201919571963756521875

%N Partial products of A006257.

%C Also the determinant of the n X n lower triangular matrix where row j is the Eytzinger array permutation of {1,2,...,j} (A375825), and similarly any lower triangular matrices with A006257 on their diagonal.

%C a(n) = a(n-1) iff n = 2^k, since those n are where A006257(n) = 1. - _Stefano Spezia_, Sep 06 2024

%H Sergey Slotin, <a href="https://algorithmica.org/en/eytzinger">Eytzinger binary search</a>.

%F a(n) = Product_{k=1..n} A006257(k).

%e For n = 9, a(9) = 1*1*3*1*3*5*7*1*3 = 945.

%t Table[Product[Flatten[Table[Range[1, 2^n - 1, 2], {n, 1, 6}]][[i]],{i,n}],{n,1,27}] (* _James C. McMahon_, Sep 19 2024 *)

%o (Python)

%o from sympy import prod

%o a = lambda n: prod(((j-(1 << j.bit_length()-1))<<1)+1 for j in range(1, n+1))

%o print([a(n) for n in range(1, 28)])

%o (PARI) a(n) = prod(k=1, n, 2*k-2^logint(2*k, 2)+1); \\ _Michel Marcus_, Sep 06 2024

%Y Cf. A006257, A375825.

%K nonn,easy

%O 1,3

%A _DarĂ­o Clavijo_, Sep 03 2024