cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A043545 (Maximal base-2 digit of n) - (minimal base-2 digit of n).

This page as a plain text file.
%I A043545 #52 Sep 12 2023 20:49:33
%S A043545 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 A043545 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 A043545 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 A043545 (Maximal base-2 digit of n) - (minimal base-2 digit of n).
%C A043545 Characteristic function of A062289 (non-Mersenne numbers A000225). - _Omar E. Pol_, Sep 05 2021
%H A043545 Reinhard Zumkeller, <a href="/A043545/b043545.txt">Table of n, a(n) for n = 0..10000</a>
%H A043545 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 A043545 0 followed by a string of 2^k - 1 1's. Also a(n)=0 iff n = 2^m - 1.
%F A043545 G.f.: 1/(1-x) - Sum_{k>=0} x^(2^k-1). - _Michael Somos_, Aug 25 2003
%F A043545 a(n) = 1 - A036987(n). 1's complement of Fredhold-Rueppel sequence. - _Michael Somos_, Aug 25 2003
%F A043545 a(n) = (1 + (-1)^binomial(n, floor(n/2)))/2. - _Paul Barry_, Jun 07 2006
%F A043545 Ignoring first zero and beginning instead with offset 2, a(n) = A006530(n) mod 2. - _Rick L. Shepherd_, Jun 09 2008
%F A043545 a(n) = A000777(n) mod 2, for n > 0. - _John M. Campbell_, Jul 16 2016
%e A043545 G.f. = x^2 + x^4 + x^5 + x^6 + x^8 + x^9 + x^10 + x^11 + x^12 + x^13 + ...
%t A043545 mb2d[n_]:=Module[{n2=IntegerDigits[n,2]},Max[n2]-Min[n2]]; Array[mb2d,120,0] (* _Harvey P. Dale_, Feb 24 2015 *)
%o A043545 (PARI) {a(n) = if( n<0, 0, n++; n != 2^valuation(n, 2))}; /* _Michael Somos_, Aug 25 2003 */
%o A043545 (PARI) a(n) = !!bitand(n, n+1); \\ _Ruud H.G. van Tol_, Sep 12 2023
%o A043545 (Haskell)
%o A043545 a043545 = (1 -) . a036987  -- _Reinhard Zumkeller_, Nov 02 2013
%Y A043545 Cf. A000225, A036987, A062289.
%Y A043545 Column k=0 of A347519.
%K A043545 nonn,base
%O A043545 0,1
%A A043545 _Clark Kimberling_