|
|
A048881
|
|
a(n) = A000120(n+1) - 1 = wt(n+1) - 1.
|
|
39
|
|
|
0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
COMMENTS
|
Highest power of 2 dividing n-th Catalan number (A000108).
a(n) = 0 iff n = 2^k - 1, k=0,1,...
Appears to be number of binary left-rotations (iterations of A006257) to reach fixed point of form 2^k-1. Right-rotation analog is A063250. This would imply that for n >= 0, a(n)=f(n), recursively defined to be 0 for n=0, otherwise as f( ( (1-n)(1-p)(1-s) - (1-n-p-s) ) / 2) + p (s+1) / 2, where p = n mod 2 and s = - signum(n) (f(n<0) is A000120(-n)). - Marc LeBrun, Jul 11 2001
Let f(0) = 01, f(1) = 12, f(2) = 23, f(3) = 34, f(4) = 45, etc. Sequence gives concatenation of 0, f(0), f(f(0)), f(f(f(0))), ... Also f(f(...f(0)...)) converges to A000120. - Philippe Deléham, Aug 14 2003
C(n, k) is the number of occurrence of k in the n-th group of terms in this sequence read by rows: {0}; {0, 1}; {0, 1, 1, 2}; {0, 1, 1, 2, 1, 2, 2, 3}; {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }; ... - Philippe Deléham, Jan 01 2004
Highest power of 2 dividing binomial(n,floor(n/2)). - Benoit Cloitre, Oct 20 2003
2^a(n) are numerators in the Maclaurin series for (sin x)^2. - Jacob A. Siehler, Nov 11 2009
Conjecture: a(n) is the sum of digits of the n-th word in A076478, for n >= 1; has been confirmed for n up to 20000. - Clark Kimberling, Jul 14 2021
|
|
LINKS
|
|
|
FORMULA
|
a(n) = k if 2^k divides A000108(n) but 2^(k+1) does not divide A000108(n).
G.f.: (1/(x-x^2)) * (x^2/(1-x) - Sum_{k>=1} x^(2^k)/(1-x^(2^k))). - Ralf Stephan, Apr 13 2002
|
|
EXAMPLE
|
Sequence can be written in the following form (irregular triangle):
0,
0,1,
0,1,1,2,
0,1,1,2,1,2,2,3,
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
...
(End)
|
|
MAPLE
|
end proc:
|
|
MATHEMATICA
|
a[n_] := IntegerExponent[ CatalanNumber[n], 2]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Jun 21 2013 *)
|
|
PROG
|
(PARI) { a(n) = if( n<0, 0, n++; n /= 2^valuation(n, 2); subst( Pol( binary( n ) ), x, 1) - 1 ) } /* Michael Somos, Aug 23 2007 */
(PARI) {a(n) = if( n<0, 0, valuation( (2*n)! / n! / (n+1)!, 2 ) ) } /* Michael Somos, Aug 23 2007 */
(PARI) a(n) = hammingweight(n+1) - 1; \\ Michel Marcus, Nov 15 2022
(Haskell)
a048881 n = a048881_list !! n
a048881_list = c [0] where c (x:xs) = x : c (xs ++ [x, x+1])
(Python 3.10+)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|