A227349
Product of lengths of runs of 1-bits in binary representation of n.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 3, 2, 2, 2, 4, 3, 3, 4, 5, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 2, 2, 2, 4, 2, 2, 4, 6, 3, 3, 3, 6, 4, 4, 5, 6, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 3, 2, 2, 2, 4, 3, 3, 4, 5, 2, 2, 2, 4, 2, 2, 4, 6, 2, 2, 2, 4, 4, 4, 6, 8, 3, 3, 3, 6, 3, 3, 6, 9, 4
Offset: 0
a(0) = 1, as zero has no runs of 1's, and an empty product is 1.
a(1) = 1, as 1 is "1" in binary, and the length of that only 1-run is 1.
a(2) = 1, as 2 is "10" in binary, and again there is only one run of 1-bits, of length 1.
a(3) = 2, as 3 is "11" in binary, and there is one run of two 1-bits.
a(55) = 6, as 55 is "110111" in binary, and 2 * 3 = 6.
a(119) = 9, as 119 is "1110111" in binary, and 3 * 3 = 9.
From _Omar E. Pol_, Feb 10 2015: (Start)
Written as an irregular triangle in which row lengths is A011782:
1;
1;
1,2;
1,1,2,3;
1,1,1,2,2,2,3,4;
1,1,1,2,1,1,2,3,2,2,2,4,3,3,4,5;
1,1,1,2,1,1,2,3,1,1,1,2,2,2,3,4,2,2,2,4,2,2,4,6,3,3,3,6,4,4,5,6;
...
Right border gives A028310: 1 together with the positive integers. (End)
From _Omar E. Pol_, Mar 19 2015: (Start)
Also, the sequence can be written as an irregular tetrahedron T(s, r, k) as shown below:
1;
..
1;
..
1;
2;
....
1,1;
2;
3;
........
1,1,1,2;
2,2;
3;
4;
................
1,1,1,2,1,1,2,3;
2,2,2,4;
3,3;
4;
5;
................................
1,1,1,2,1,1,2,3,1,1,1,2,2,2,3,4;
2,2,2,4,2,2,4,6;
3,3,3,6;
4,4;
5;
6;
...
Apart from the initial 1, we have that T(s, r, k) = T(s+1, r, k). (End)
Cf.
A000120 (sum of lengths of runs of 1-bits),
A167489,
A227350,
A227193,
A278222,
A245562,
A284562,
A284569,
A283972,
A284582,
A284583.
Differs from similar
A284580 for the first time at n=119, where a(119) = 9, while
A284580(119) = 5.
-
a:= proc(n) local i, m, r; m, r:= n, 1;
while m>0 do
while irem(m, 2, 'h')=0 do m:=h od;
for i from 0 while irem(m, 2, 'h')=1 do m:=h od;
r:= r*i
od; r
end:
seq(a(n), n=0..100); # Alois P. Heinz, Jul 11 2013
ans:=[];
for n from 0 to 100 do lis:=[]; t1:=convert(n, base, 2); L1:=nops(t1); out1:=1; c:=0;
for i from 1 to L1 do
if out1 = 1 and t1[i] = 1 then out1:=0; c:=c+1;
elif out1 = 0 and t1[i] = 1 then c:=c+1;
elif out1 = 1 and t1[i] = 0 then c:=c;
elif out1 = 0 and t1[i] = 0 then lis:=[c, op(lis)]; out1:=1; c:=0;
fi;
if i = L1 and c>0 then lis:=[c, op(lis)]; fi;
od:
a:=mul(i, i in lis);
ans:=[op(ans), a];
od:
ans; # N. J. A. Sloane, Sep 05 2014
-
onBitRunLenProd[n_] := Times @@ Length /@ Select[Split @ IntegerDigits[n, 2], #[[1]] == 1 & ]; Array[onBitRunLenProd, 100, 0] (* Jean-François Alcover, Mar 02 2016 *)
-
from operator import mul
from functools import reduce
from re import split
def A227349(n):
return reduce(mul, (len(d) for d in split('0+',bin(n)[2:]) if d)) if n > 0 else 1 # Chai Wah Wu, Sep 07 2014
-
# uses[RLT from A246660]
A227349_list = lambda len: RLT(lambda n: n, len)
A227349_list(88) # Peter Luschny, Sep 07 2014
-
(define (A227349 n) (apply * (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2)))))
(define (bisect lista parity) (let loop ((lista lista) (i 0) (z (list))) (cond ((null? lista) (reverse! z)) ((eq? i parity) (loop (cdr lista) (modulo (1+ i) 2) (cons (car lista) z))) (else (loop (cdr lista) (modulo (1+ i) 2) z)))))
(define (binexp->runcount1list n) (if (zero? n) (list) (let loop ((n n) (rc (list)) (count 0) (prev-bit (modulo n 2))) (if (zero? n) (cons count rc) (if (eq? (modulo n 2) prev-bit) (loop (floor->exact (/ n 2)) rc (1+ count) (modulo n 2)) (loop (floor->exact (/ n 2)) (cons count rc) 1 (modulo n 2)))))))
A246660
Run Length Transform of factorials.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 2, 2, 6, 24, 1, 1, 1, 2, 1, 1, 2, 6, 2, 2, 2, 4, 6, 6, 24, 120, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 2, 2, 6, 24, 2, 2, 2, 4, 2, 2, 4, 12, 6, 6, 6, 12, 24, 24, 120, 720, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 2, 2, 6, 24, 1, 1, 1
Offset: 0
Cf.
A003714 (gives the positions of ones).
-
Table[Times @@ (Length[#]!&) /@ Select[Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 83}] (* Jean-François Alcover, Jul 11 2017 *)
-
A246660(n) = { my(i=0, p=1); while(n>0, if(n%2, i++; p = p * i, i = 0); n = n\2); p; };
for(n=0, 8192, write("b246660.txt", n, " ", A246660(n)));
\\ Antti Karttunen, Sep 08 2014
-
from operator import mul
from functools import reduce
from re import split
from math import factorial
def A246660(n):
return reduce(mul,(factorial(len(d)) for d in split('0+',bin(n)[2:]) if d)) if n > 0 else 1 # Chai Wah Wu, Sep 09 2014
-
def RLT(f, size):
L = lambda n: [a for a in Integer(n).binary().split('0') if a != '']
return [mul([f(len(d)) for d in L(n)]) for n in range(size)]
A246660_list = lambda len: RLT(factorial, len)
A246660_list(88)
-
;; A stand-alone loop version, like the Pari-program above:
(define (A246660 n) (let loop ((n n) (i 0) (p 1)) (cond ((zero? n) p) ((odd? n) (loop (/ (- n 1) 2) (+ i 1) (* p (+ 1 i)))) (else (loop (/ n 2) 0 p)))))
;; One based on given recurrence, utilizing memoizing definec-macro from my IntSeq-library:
(definec (A246660 n) (cond ((zero? n) 1) ((even? n) (A246660 (/ n 2))) (else (* (A007814 (+ n 1)) (A246660 (/ (- n 1) 2))))))
;; Yet another implementation, using fold:
(define (A246660 n) (fold-left (lambda (a r) (* a (A000142 r))) 1 (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2)))))
(definec (A000142 n) (if (zero? n) 1 (* n (A000142 (- n 1)))))
;; Other functions are as in A227349 - Antti Karttunen, Sep 08 2014
A246588
Run Length Transform of S(n) = wt(n) = 0,1,1,2,1,2,2,3,1,... (cf. A000120).
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1
Offset: 0
-
import Data.List (group)
a246588 = product . map (a000120 . length) .
filter ((== 1) . head) . group . a030308_row
-- Reinhard Zumkeller, Feb 13 2015, Sep 05 2014
-
A000120 := proc(n) local w, m, i; w := 0; m :=n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end: wt := A000120;
ans:=[];
for n from 0 to 100 do lis:=[]; t1:=convert(n, base, 2); L1:=nops(t1); out1:=1; c:=0;
for i from 1 to L1 do
if out1 = 1 and t1[i] = 1 then out1:=0; c:=c+1;
elif out1 = 0 and t1[i] = 1 then c:=c+1;
elif out1 = 1 and t1[i] = 0 then c:=c;
elif out1 = 0 and t1[i] = 0 then lis:=[c, op(lis)]; out1:=1; c:=0;
fi;
if i = L1 and c>0 then lis:=[c, op(lis)]; fi;
od:
a:=mul(wt(i), i in lis);
ans:=[op(ans), a];
od:
ans;
-
f[n_] := DigitCount[n, 2, 1]; Table[Times @@ (f[Length[#]]&) /@ Select[ Split[ IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 100}] (* Jean-François Alcover, Jul 11 2017 *)
-
from operator import mul
from functools import reduce
from re import split
def A246588(n):
return reduce(mul,(bin(len(d)).count('1') for d in split('0+',bin(n)[2:]) if d)) if n > 0 else 1 # Chai Wah Wu, Sep 07 2014
-
# uses[RLT from A246660]
A246588_list = lambda len: RLT(lambda n: sum(Integer(n).digits(2)), len)
A246588_list(88) # Peter Luschny, Sep 07 2014
A246595
Run Length Transform of squares.
Original entry on oeis.org
1, 1, 1, 4, 1, 1, 4, 9, 1, 1, 1, 4, 4, 4, 9, 16, 1, 1, 1, 4, 1, 1, 4, 9, 4, 4, 4, 16, 9, 9, 16, 25, 1, 1, 1, 4, 1, 1, 4, 9, 1, 1, 1, 4, 4, 4, 9, 16, 4, 4, 4, 16, 4, 4, 16, 36, 9, 9, 9, 36, 16, 16, 25, 36, 1, 1, 1, 4, 1, 1, 4, 9, 1, 1, 1, 4, 4, 4, 9, 16, 1, 1, 1, 4, 1, 1
Offset: 0
From _Omar E. Pol_, Feb 10 2015: (Start)
Written as an irregular triangle in which row lengths is A011782:
1;
1;
1,4;
1,1,4,9;
1,1,1,4,4,4,9,16;
1,1,1,4,1,1,4,9,4,4,4,16,9,9,16,25;
1,1,1,4,1,1,4,9,1,1,1,4,4,4,9,16,4,4,4,16,4,4,16,36,9,9,9,36,16,16,25,36;
...
Right border gives A253909: 1 together with the positive squares.
(End)
From _Omar E. Pol_, Mar 19 2015: (Start)
Also, the sequence can be written as an irregular tetrahedron T(s,r,k) as shown below:
1;
..
1;
..
1;
4;
.......
1, 1;
4;
9;
...............
1, 1, 1, 4;
4, 4;
9;
16;
.............................
1, 1, 1, 4, 1, 1, 4, 9;
4, 4, 4, 16;
9, 9;
16;
25;
......................................................
1, 1, 1, 4, 1, 1, 4, 9, 1, 1, 1, 4, 4, 4, 9, 16;
4, 4, 4, 16, 4, 4, 16, 36;
9, 9, 9, 36;
16, 16;
25;
36;
...
Apart from the initial 1, we have that T(s,r,k) = T(s+1,r,k).
(End)
Cf.
A003714 (gives the positions of ones).
-
ans:=[];
for n from 0 to 100 do lis:=[]; t1:=convert(n, base, 2); L1:=nops(t1); out1:=1; c:=0;
for i from 1 to L1 do
if out1 = 1 and t1[i] = 1 then out1:=0; c:=c+1;
elif out1 = 0 and t1[i] = 1 then c:=c+1;
elif out1 = 1 and t1[i] = 0 then c:=c;
elif out1 = 0 and t1[i] = 0 then lis:=[c, op(lis)]; out1:=1; c:=0;
fi;
if i = L1 and c>0 then lis:=[c, op(lis)]; fi;
od:
a:=mul(i^2, i in lis);
ans:=[op(ans), a];
od:
ans;
-
Table[Times @@ (Length[#]^2&) /@ Select[Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 85}] (* Jean-François Alcover, Jul 11 2017 *)
-
from operator import mul
from functools import reduce
from re import split
def A246595(n):
return reduce(mul,(len(d)**2 for d in split('0+',bin(n)[2:]) if d != '')) if n > 0 else 1 # Chai Wah Wu, Sep 07 2014
-
# uses[RLT from A246660]
A246595_list = lambda len: RLT(lambda n: n^2, len)
A246595_list(86) # Peter Luschny, Sep 07 2014
-
; using MIT/GNU Scheme
(define (A246595 n) (fold-left (lambda (a r) (* a r r)) 1 (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2)))))
;; Other functions are as in A227349 - Antti Karttunen, Sep 08 2014
A246596
Run Length Transform of Catalan numbers A000108.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 2, 5, 1, 1, 1, 2, 2, 2, 5, 14, 1, 1, 1, 2, 1, 1, 2, 5, 2, 2, 2, 4, 5, 5, 14, 42, 1, 1, 1, 2, 1, 1, 2, 5, 1, 1, 1, 2, 2, 2, 5, 14, 2, 2, 2, 4, 2, 2, 4, 10, 5, 5, 5, 10, 14, 14, 42, 132, 1, 1, 1, 2, 1, 1, 2, 5, 1, 1, 1, 2, 2, 2, 5, 14, 1, 1, 1, 2, 1, 1, 2, 5
Offset: 0
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,2;
1,1,2,5;
1,1,1,2,2,2,5,14;
1,1,1,2,1,1,2,5,2,2,2,4,5,5,14,42;
1,1,1,2,1,1,2,5,1,1,1,2,2,2,5,14,2,2,2,4,2,2,4,10,5,5,5,10,14,14,42,132;
...
Right border gives the Catalan numbers. This is simply a restatement of the theorem that this sequence is the Run Length Transform of A000108.
(End)
Cf.
A003714 (gives the positions of ones).
-
Cat:=n->binomial(2*n,n)/(n+1);
ans:=[];
for n from 0 to 100 do lis:=[]; t1:=convert(n, base, 2); L1:=nops(t1); out1:=1; c:=0;
for i from 1 to L1 do
if out1 = 1 and t1[i] = 1 then out1:=0; c:=c+1;
elif out1 = 0 and t1[i] = 1 then c:=c+1;
elif out1 = 1 and t1[i] = 0 then c:=c;
elif out1 = 0 and t1[i] = 0 then lis:=[c, op(lis)]; out1:=1; c:=0;
fi;
if i = L1 and c>0 then lis:=[c, op(lis)]; fi;
od:
a:=mul(Cat(i), i in lis);
ans:=[op(ans), a];
od:
ans;
-
f = CatalanNumber; Table[Times @@ (f[Length[#]]&) /@ Select[ Split[ IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 87}] (* Jean-François Alcover, Jul 11 2017 *)
-
from operator import mul
from functools import reduce
from gmpy2 import divexact
from re import split
def A246596(n):
s, c = bin(n)[2:], [1, 1]
for m in range(1, len(s)):
c.append(divexact(c[-1]*(4*m+2),(m+2)))
return reduce(mul,(c[len(d)] for d in split('0+',s))) if n > 0 else 1
# Chai Wah Wu, Sep 07 2014
-
# uses[RLT from A246660]
A246596_list = lambda len: RLT(lambda n: binomial(2*n, n)/(n+1), len)
A246596_list(88) # Peter Luschny, Sep 07 2014
-
; using MIT/GNU Scheme
(define (A246596 n) (fold-left (lambda (a r) (* a (A000108 r))) 1 (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2)))))
(define A000108 (EIGEN-CONVOLUTION 1 *))
;; Note: EIGEN-CONVOLUTION can be found from my IntSeq-library and other functions are as in A227349. - Antti Karttunen, Sep 08 2014
A255047
1 together with the positive terms of A000225.
Original entry on oeis.org
1, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647, 4294967295
Offset: 0
- S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015.
- R. Stanley, Parking Functions, 2011.
- Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
- S. Wolfram, A New Kind of Science
- Wolfram Research, Wolfram Atlas of Simple Programs
- Index entries for sequences related to cellular automata
- Index to 2D 5-Neighbor Cellular Automata
- Index to Elementary Cellular Automata
- Index entries for linear recurrences with constant coefficients, signature (3,-2).
-
[1] cat [2^n -1: n in [1..40]]; // G. C. Greubel, Feb 07 2021
-
CoefficientList[Series[(1 -2*x +2*x^2)/((1-x)*(1-2*x)), {x, 0, 33}], x] (* or *) LinearRecurrence[{3, -2}, {1,1,3}, 40] (* Vincenzo Librandi, Jul 20 2017 *)
Table[2^n -1 +Boole[n==0], {n, 0, 40}] (* G. C. Greubel, Feb 07 2021 *)
-
def A255047(n): return -1^(-1<Chai Wah Wu, Dec 21 2022
-
[1]+[2^n -1 for n in (1..40)] # G. C. Greubel, Feb 07 2021
Original entry on oeis.org
1, 1, 1, 3, 1, 1, 3, 5, 1, 1, 1, 3, 3, 3, 5, 15, 1, 1, 1, 3, 1, 1, 3, 5, 3, 3, 3, 9, 5, 5, 15, 17, 1, 1, 1, 3, 1, 1, 3, 5, 1, 1, 1, 3, 3, 3, 5, 15, 3, 3, 3, 9, 3, 3, 9, 15, 5, 5, 5, 15, 15, 15, 17, 51, 1, 1, 1, 3, 1, 1, 3, 5, 1, 1, 1, 3, 3, 3, 5, 15, 1, 1, 1, 3, 1, 1, 3, 5, 3, 3, 3, 9, 5, 5, 15, 17, 3, 3, 3, 9, 3, 3, 9, 15, 3, 3, 3, 9, 9, 9, 15, 45
Offset: 0
115 is '1110011' in binary. The run lengths of 1-runs are 2 and 3, thus a(115) = A001317(2-1) * A001317(3-1) = 3*5 = 15.
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,5;
1,1,1,3,3,3,5,15;
1,1,1,3,1,1,3,5,3,3,3,9,5,5,15,17;
1,1,1,3,1,1,3,5,1,1,1,3,3,3,5,15,3,3,3,9,3,3,9,15,5,5,5,15,15,15,17,51;
...
Right border gives 1 together with A001317.
(End)
Cf.
A003714 (gives the positions of ones).
A001316 is obtained when the same transformation is applied to
A000079, the powers of two.
-
a1317[n_] := FromDigits[ Table[ Mod[Binomial[n-1, k], 2], {k, 0, n-1}], 2];
Table[ Times @@ (a1317[Length[#]]&) /@ Select[Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 100}] (* Jean-François Alcover, Jul 11 2017 *)
-
# uses RLT function from A278159
def A247282(n): return RLT(n,lambda m: int(''.join(str(int(not(~(m-1)&k))) for k in range(m)),2)) # Chai Wah Wu, Feb 04 2022
A246685
Run Length Transform of sequence 1, 3, 5, 17, 257, 65537, ... (1 followed by Fermat numbers).
Original entry on oeis.org
1, 1, 1, 3, 1, 1, 3, 5, 1, 1, 1, 3, 3, 3, 5, 17, 1, 1, 1, 3, 1, 1, 3, 5, 3, 3, 3, 9, 5, 5, 17, 257, 1, 1, 1, 3, 1, 1, 3, 5, 1, 1, 1, 3, 3, 3, 5, 17, 3, 3, 3, 9, 3, 3, 9, 15, 5, 5, 5, 15, 17, 17, 257, 65537, 1, 1, 1, 3, 1, 1, 3, 5, 1, 1, 1, 3, 3, 3, 5, 17, 1, 1, 1, 3, 1, 1, 3, 5, 3, 3, 3, 9, 5, 5, 17, 257
Offset: 0
115 is '1110011' in binary. The run lengths of 1-runs are 2 and 3, thus we multiply the second and the third elements of the sequence 1, 3, 5, 17, 257, 65537, ... to get a(115) = 3*5 = 15.
Cf.
A003714 (gives the positions of ones).
A001316 is obtained when the same transformation is applied to
A000079, the powers of two. Cf. also
A001317.
-
f[n_] := Switch[n, 0|1, 1, , 2^(2^(n-2))+1]; Table[Times @@ (f[Length[#]] &) /@ Select[s = Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 95}] (* _Jean-François Alcover, Jul 11 2017 *)
-
# use RLT function from A278159
def A246685(n): return RLT(n,lambda m: 1 if m <= 1 else 2**(2**(m-2))+1) # Chai Wah Wu, Feb 04 2022
A324910
Multiplicative with a(p^e) = (2^e)-1.
Original entry on oeis.org
1, 1, 1, 3, 1, 1, 1, 7, 3, 1, 1, 3, 1, 1, 1, 15, 1, 3, 1, 3, 1, 1, 1, 7, 3, 1, 7, 3, 1, 1, 1, 31, 1, 1, 1, 9, 1, 1, 1, 7, 1, 1, 1, 3, 3, 1, 1, 15, 3, 3, 1, 3, 1, 7, 1, 7, 1, 1, 1, 3, 1, 1, 3, 63, 1, 1, 1, 3, 1, 1, 1, 21, 1, 1, 3, 3, 1, 1, 1, 15, 15, 1, 1, 3, 1, 1, 1, 7, 1, 3, 1, 3, 1, 1, 1, 31, 1, 3, 3, 9, 1, 1, 1, 7, 1
Offset: 1
-
Array[Times @@ (2^(FactorInteger[#][[All, -1]]) - 1) &, 105] (* Michael De Vlieger, Apr 14 2019 *)
-
A324910(n) = factorback(apply(e -> -1+(2^e), factor(n)[,2]~));
A356397
a(n) is the product of the terms in the n-th row of triangle A343835; a(0) = 1.
Original entry on oeis.org
1, 1, 2, 3, 4, 4, 6, 7, 8, 8, 16, 24, 12, 12, 14, 15, 16, 16, 32, 48, 64, 64, 96, 112, 24, 24, 48, 72, 28, 28, 30, 31, 32, 32, 64, 96, 128, 128, 192, 224, 256, 256, 512, 768, 384, 384, 448, 480, 48, 48, 96, 144, 192, 192, 288, 336, 56, 56, 112, 168, 60, 60, 62
Offset: 0
For n = 11:
- row 11 of A343835 is (8, 3),
- so a(11) = 8 * 3 = 24.
-
a(n) = { my (v=1); while (n, my (z=valuation(n, 2), o=valuation(n/2^z+1, 2), r=(2^o-1)*2^z); n-=r; v*=r); v }
Showing 1-10 of 10 results.
Comments