A246661 Run Length Transform of swinging factorials (A056040).
1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 2, 2, 6, 6, 1, 1, 1, 2, 1, 1, 2, 6, 2, 2, 2, 4, 6, 6, 6, 30, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 2, 2, 6, 6, 2, 2, 2, 4, 2, 2, 4, 12, 6, 6, 6, 12, 6, 6, 30, 20, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 2, 2, 6, 6, 1, 1, 1, 2, 1, 1
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..8191
Programs
-
Mathematica
f[n_] := n!/Quotient[n, 2]!^2; Table[Times @@ (f[Length[#]]&) /@ Select[ Split[ IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 85}] (* Jean-François Alcover, Jul 11 2017 *)
-
Python
# use RLT function from A278159 from math import factorial def A246661(n): return RLT(n,lambda m: factorial(m)//factorial(m//2)**2) # Chai Wah Wu, Feb 04 2022
-
Sage
# uses[RLT from A246660] A246661_list = lambda len: RLT(lambda n: factorial(n)/factorial(n//2)^2, len) A246661_list(88)
Formula
a(2^n-1) = n$ where n$ is the swinging factorial of n, A056040(n).
Comments