login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A043545 (Maximal base-2 digit of n) - (minimal base-2 digit of n). 12
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; text; internal format)
OFFSET

0,1

COMMENTS

Characteristic function of A062289 (non-Mersenne numbers A000225). - Omar E. Pol, Sep 05 2021

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

Paul Barry, Conjectures and results on some generalized Rueppel sequences, arXiv:2107.00442 [math.CO], 2021.

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 - A036987(n). 1's complement of Fredhold-Rueppel sequence. - Michael Somos, Aug 25 2003

a(n) = (1 + (-1)^binomial(n, floor(n/2)))/2. - Paul Barry, Jun 07 2006

Ignoring first zero and beginning instead with offset 2, a(n) = A006530(n) mod 2. - Rick L. Shepherd, Jun 09 2008

a(n) = A000777(n) mod 2, for n > 0. - John M. Campbell, Jul 16 2016

EXAMPLE

G.f. = x^2 + x^4 + x^5 + x^6 + x^8 + x^9 + x^10 + x^11 + x^12 + x^13 + ...

MATHEMATICA

mb2d[n_]:=Module[{n2=IntegerDigits[n, 2]}, Max[n2]-Min[n2]]; Array[mb2d, 120, 0] (* Harvey P. Dale, Feb 24 2015 *)

PROG

(PARI) {a(n) = if( n<0, 0, n++; n != 2^valuation(n, 2))}; /* Michael Somos, Aug 25 2003 */

(Haskell)

a043545 = (1 -) . a036987  -- Reinhard Zumkeller, Nov 02 2013

CROSSREFS

Cf. A000225, A036987, A062289.

Column k=0 of A347519.

Sequence in context: A353670 A252744 A340373 * A094754 A321694 A262684

Adjacent sequences:  A043542 A043543 A043544 * A043546 A043547 A043548

KEYWORD

nonn,base

AUTHOR

Clark Kimberling

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 16:06 EDT 2022. Contains 353706 sequences. (Running on oeis4.)