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

%I #52 Sep 12 2023 20:49:33

%S 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,

%T 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,

%U 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

%N (Maximal base-2 digit of n) - (minimal base-2 digit of n).

%C Characteristic function of A062289 (non-Mersenne numbers A000225). - _Omar E. Pol_, Sep 05 2021

%H Reinhard Zumkeller, <a href="/A043545/b043545.txt">Table of n, a(n) for n = 0..10000</a>

%H Paul Barry, <a href="https://arxiv.org/abs/2107.00442">Conjectures and results on some generalized Rueppel sequences</a>, arXiv:2107.00442 [math.CO], 2021.

%F 0 followed by a string of 2^k - 1 1's. Also a(n)=0 iff n = 2^m - 1.

%F G.f.: 1/(1-x) - Sum_{k>=0} x^(2^k-1). - _Michael Somos_, Aug 25 2003

%F a(n) = 1 - A036987(n). 1's complement of Fredhold-Rueppel sequence. - _Michael Somos_, Aug 25 2003

%F a(n) = (1 + (-1)^binomial(n, floor(n/2)))/2. - _Paul Barry_, Jun 07 2006

%F Ignoring first zero and beginning instead with offset 2, a(n) = A006530(n) mod 2. - _Rick L. Shepherd_, Jun 09 2008

%F a(n) = A000777(n) mod 2, for n > 0. - _John M. Campbell_, Jul 16 2016

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

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

%o (PARI) {a(n) = if( n<0, 0, n++; n != 2^valuation(n, 2))}; /* _Michael Somos_, Aug 25 2003 */

%o (PARI) a(n) = !!bitand(n, n+1); \\ _Ruud H.G. van Tol_, Sep 12 2023

%o (Haskell)

%o a043545 = (1 -) . a036987 -- _Reinhard Zumkeller_, Nov 02 2013

%Y Cf. A000225, A036987, A062289.

%Y Column k=0 of A347519.

%K nonn,base

%O 0,1

%A _Clark Kimberling_

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 July 16 11:34 EDT 2024. Contains 374347 sequences. (Running on oeis4.)