A246674 Run Length Transform of A000225.
1, 1, 1, 3, 1, 1, 3, 7, 1, 1, 1, 3, 3, 3, 7, 15, 1, 1, 1, 3, 1, 1, 3, 7, 3, 3, 3, 9, 7, 7, 15, 31, 1, 1, 1, 3, 1, 1, 3, 7, 1, 1, 1, 3, 3, 3, 7, 15, 3, 3, 3, 9, 3, 3, 9, 21, 7, 7, 7, 21, 15, 15, 31, 63, 1, 1, 1, 3, 1, 1, 3, 7, 1, 1, 1, 3, 3, 3, 7, 15, 1, 1, 1, 3, 1, 1, 3, 7, 3, 3, 3, 9, 7, 7, 15, 31, 3, 3, 3, 9, 3, 3, 9, 21, 3, 3, 3, 9, 9, 9, 21, 45, 7, 7, 7, 21, 7, 7, 21, 49, 15, 15, 15, 45, 31, 31, 63, 127, 1
Offset: 0
Examples
115 is '1110011' in binary. The run lengths of 1-runs are 2 and 3, thus a(115) = A000225(2) * A000225(3) = ((2^2)-1) * ((2^3)-1) = 3*7 = 21. The same result can be also obtained more directly, by realizing that '111' and '11' are the binary representations of 7 and 3, and 7*3 = 21. From _Omar E. Pol_, Feb 15 2015: (Start) Written as an irregular triangle in which row lengths are the terms of A011782: 1; 1; 1,3; 1,1,3,7; 1,1,1,3,3,3,7,15; 1,1,1,3,1,1,3,7,3,3,3,9,7,7,15,31; 1,1,1,3,1,1,3,7,1,1,1,3,3,3,7,15,3,3,3,9,3,3,9,21,7,7,7,21,15,15,31,63; ... Right border gives 1 together with the positive terms of A000225. (End)
Links
- Antti Karttunen, Table of n, a(n) for n = 0..8192
Crossrefs
Programs
-
Mathematica
f[n_] := 2^n - 1; Table[Times @@ (f[Length[#]]&) /@ Select[ Split[ IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 100}] (* Jean-François Alcover, Jul 11 2017 *)
-
Python
# uses RLT function in A278159 def A246674(n): return RLT(n,lambda m: 2**m-1) # Chai Wah Wu, Feb 04 2022
Comments