|
|
A036987
|
|
Fredholm-Rueppel sequence.
|
|
121
|
|
|
1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Binary representation of the Kempner-Mahler number Sum_{k>=0} 1/2^(2^k) = A007404.
Also a(n) = A(n) mod 2 where A is any of A001700, A005573, A007854, A026641, A049027, A064063, A064088, A064090, A064092, A064325, A064327, A064329, A064331, A064613, A076026, A105523, A123273, A126694, A126930, A126931, A126982, A126983, A126987, A127016, A127053, A127358, A127360, A127361, A127363. - Philippe Deléham, May 26 2007
a(n) = (product of digits of n; n in binary notation) mod 2. This sequence is a transformation of the Thue-Morse sequence (A010060), since there exists a function f such that f(sum of digits of n) = (product of digits of n). - Ctibor O. Zizka, Feb 12 2008
a(n-1), n >= 1, the characteristic sequence for powers of 2, A000079, is the unique solution of the following formal product and formal power series identity: Product_{j>=1} (1 + a(j-1)*x^j) = 1 + Sum_{k>=1} x^k = 1/(1-x). The product is therefore Product_{l>=1} (1 + x^(2^l)). Proof. Compare coefficients of x^n and use the binary representation of n. Uniqueness follows from the recurrence relation given for the general case under A147542. - Wolfdieter Lang, Mar 05 2009
a(n) is also the number of orbits of length n for the map x -> 1-cx^2 on [-1,1] at the Feigenbaum critical value c=1.401155... . - Thomas Ward, Apr 08 2009
For n >= 2, also the largest exponent k >= 0 such that n^k in binary notation does not contain both 0 and 1. Unlike for the decimal version of this sequence, A062518, where the terms are only conjectural, for this sequence the values of a(n) can be proved to be the characteristic function of A000225, as follows: n^k will contain both 0 and 1 unless n^k = 2^r-1 for some r. But this is a special case of Catalan's equation x^p = y^q-1, which was proved by Preda Mihăilescu to have no nontrivial solution except 2^3 = 3^2 - 1. - Christopher J. Smyth, Aug 22 2014
Image, under the coding a,b -> 1; c -> 0, of the fixed point, starting with a, of the morphism a -> ab, b -> cb, c -> cc. - Jeffrey Shallit, May 14 2016
Number of nonisomorphic Boolean algebras of order n+1. - Jianing Song, Jan 23 2020
|
|
LINKS
|
D. Kohel, S. Ling and C. Xing, Explicit Sequence Expansions, in Sequences and their Applications, C. Ding, T. Helleseth, and H. Niederreiter, eds., Proceedings of SETA'98 (Singapore, 1998), 308-317, 1999.
Eric Rowland and Reem Yassawi, Profinite automata, arXiv:1403.7659 [math.DS], 2014. See p. 8.
|
|
FORMULA
|
1 followed by a string of 2^k - 1 0's. Also a(n)=1 iff n = 2^m - 1.
Sum_{n>=0} 1/10^(2^n) = 0.110100010000000100000000000000010...
1 if n=0, floor(log_2(n+1)) - floor(log_2(n)) otherwise. G.f.: (1/x) * Sum_{k>=0} x^(2^k) = Sum_{k>=0} x^(2^k-1). - Ralf Stephan, Apr 28 2003
Dirichlet g.f. for right-shifted sequence: 2^(-s)/(1-2^(-s)).
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n,k)*Sum_{j=0..k} binomial(k, 2^j-1). - Paul Barry, Jun 01 2006
a(n) = Sum_{k=1..n} A191898(n,k)*cos(Pi*(n-1)*(k-1))/n; (conjecture). - Mats Granvik, Mar 04 2013
a(n) = 1 iff n=2^k-1 for some k, 0 otherwise. - M. F. Hasler, Jun 20 2014
a(n) = ceiling(log_2(n+2)) - ceiling(log_2(n+1)). - Gionata Neri, Sep 06 2015
a(n) = (A000913(n-1) mod 2), for n>1.
a(n) = (A000917(n-1) mod 2), for n>0.
a(n) = (A002057(n-2) mod 2), for n>1.
a(n) = floor(1+log(n+1)/log(2)) - floor(log(2n+1)/log(2)). - Adriano Caroli, Sep 22 2019
This is also the decimal expansion of -Sum_{k>=1} mu(2*k)/(10^k - 1), where mu is the Möbius function (A008683). - Amiram Eldar, Jul 12 2020
|
|
EXAMPLE
|
G.f. = 1 + x + x^3 + x^7 + x^15 + x^31 + x^63 + x^127 + x^255 + x^511 + ...
a(7) = 1 since 7 = 2^3 - 1, while a(10) = 0 since 10 is not of the form 2^k - 1 for any integer k.
|
|
MAPLE
|
A036987:= n-> `if`(2^ilog2(n+1) = n+1, 1, 0):
|
|
MATHEMATICA
|
RealDigits[ N[ Sum[1/10^(2^n), {n, 0, Infinity}], 110]][[1]]
(* Recurrence: *)
t[n_, 1] = 1; t[1, k_] = 1;
t[n_, k_] := t[n, k] =
If[n < k, If[n > 1 && k > 1, -Sum[t[k - i, n], {i, 1, n - 1}], 0],
If[n > 1 && k > 1, Sum[t[n - i, k], {i, 1, k - 1}], 0]];
Table[t[n, k], {k, n, n}, {n, 104}]
mb2d[n_]:=1 - Module[{n2 = IntegerDigits[n, 2]}, Max[n2] - Min[n2]]; Array[mb2d, 120, 0] (* Vincenzo Librandi, Jul 19 2019 *)
Table[PadRight[{1}, 2^k, 0], {k, 0, 7}]//Flatten (* Harvey P. Dale, Apr 23 2022 *)
|
|
PROG
|
(PARI) {a(n) =( n++) == 2^valuation(n, 2)}; /* Michael Somos, Aug 25 2003 */
(Haskell)
a036987 n = ibp (n+1) where
ibp 1 = 1
ibp n = if r > 0 then 0 else ibp n' where (n', r) = divMod n 2
a036987_list = 1 : f [0, 1] where f (x:y:xs) = y : f (x:xs ++ [x, x+y])
-- Same list generator function as for a091090_list, cf. A091090.
(Python)
from sympy import catalan
(Python)
|
|
CROSSREFS
|
The first row of A073346. Occurs for first time in A073202 as row 6 (and again as row 8).
If interpreted with offset=1 instead of 0 (i.e., a(1)=1, a(2)=1, a(3)=0, a(4)=1, ...) then this is the characteristic function of 2^n (A000079) and as such occurs as the first row of A073265. Also, in that case the INVERT transform will produce A023359.
This is Guy Steele's sequence GS(1, 3), also GS(3, 1) (see A135416).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|