|
| |
|
|
A043545
|
|
(Maximal base 2 digit of n)-(minimal base 2 digit of n).
|
|
3
| |
|
|
0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,1
|
|
|
FORMULA
| 0 followed by a string of 2^k - 1 1's. Also a(n)=0 iff n = 2^m - 1.
G.f.: 1/(1-x) - Sum_{k>=0} x^(2^k-1). - Michael Somos, Aug 25 2003
a(n)=(1+(-1)^C(n,floor(n/2)))/2; - Paul Barry (pbarry(AT)wit.ie), Jun 07 2006
Ignoring first zero and beginning instead with offset 2, a(n) = A006530(n) mod 2. - Rick L. Shepherd (rshepherd2(AT)hotmail.com), Jun 09 2008
|
|
|
PROG
| (PARI) a(n)=if(n<0, 0, n++; n!=2^valuation(n, 2))
|
|
|
CROSSREFS
| Ones-complement of Fredholm-Rueppel sequence A036987.
Sequence in context: A143538 A011656 * A094754 A091225 A175337 A132380
Adjacent sequences: A043542 A043543 A043544 * A043546 A043547 A043548
|
|
|
KEYWORD
| nonn,base
|
|
|
AUTHOR
| Clark Kimberling (ck6(AT)evansville.edu)
|
| |
|
|