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.

Showing 1-10 of 17 results. Next

A216199 Abelian complexity function of the ternary Thue-Morse word (A036577).

Original entry on oeis.org

3, 3, 5, 3, 4, 5, 4, 3, 5, 4, 6, 5, 6, 4, 5, 3, 4, 5, 6, 4, 6, 6, 6, 5, 6, 6, 6, 4, 6, 5, 4, 3, 5, 4, 6, 5, 6, 6, 6, 4, 6, 6, 8, 6, 7, 6, 6, 5, 6, 6, 7, 6, 8, 6, 6, 4, 6, 6, 6, 5, 6, 4, 5, 3, 4, 5, 6, 4, 6, 6, 6, 5, 6, 6, 7, 6, 8, 6, 6, 4, 6, 6, 8, 6, 7, 8, 7, 6, 8, 7, 8, 6, 7, 6, 6, 5, 6, 6, 7
Offset: 1

Views

Author

Nathan Fox, Mar 12 2013

Keywords

Comments

abs(a(n) - (3/2)*(A007302(n) + 1)) <= 1/2.

Crossrefs

A096268 Period-doubling sequence (or period-doubling word): fixed point of the morphism 0 -> 01, 1 -> 00.

Original entry on oeis.org

0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0
Offset: 0

Views

Author

N. J. A. Sloane, Jun 22 2004

Keywords

Comments

Take highest power of 2 dividing n (A007814(n+1)), read modulo 2.
For the scale-invariance properties see Hendriks et al., 2012.
This is the sequence that results from the ternary Thue-Morse sequence (A036577) if all twos in that sequence are replaced by zeros. - Nathan Fox, Mar 12 2013
This sequence can be used to draw the Von Koch snowflake with a suitable walk in the plane. Start from the origin then the n-th step is "turn +Pi/3 if a(n)=0 and turn -2*Pi/3 if a(n)=1" (see link for a plot of the first 200000 steps). - Benoit Cloitre, Nov 10 2013
1 iff the number of trailing zeros in the binary representation of n+1 is odd. - Ralf Stephan, Nov 11 2013
Equivalently, with offset 1, the characteristic function of A036554 and an indicator for the A003159/A036554 classification of positive integers. - Peter Munn, Jun 02 2020

Examples

			Start: 0
Rules:
  0 --> 01
  1 --> 00
-------------
0:   (#=1)
  0
1:   (#=2)
  01
2:   (#=4)
  0100
3:   (#=8)
  01000101
4:   (#=16)
  0100010101000100
5:   (#=32)
  01000101010001000100010101000101
6:   (#=64)
  0100010101000100010001010100010101000101010001000100010101000100
7:   (#=128)
  010001010100010001000101010001010100010101000100010001010100010001000101010...
[_Joerg Arndt_, Jul 06 2011]
		

References

  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Not the same as A073059!
Swapping 0 and 1 gives A035263.
Cf. A056832, A123087 (partial sums).
With offset 1, classification indicator for A003159/A036554.
Also with offset 1: A007814 mod 2 (cf. A096271 for mod 3), A048675 mod 2 (cf. A332813 for mod 3), A059975 mod 2.

Programs

  • Haskell
    a096268 = (subtract 1) . a056832 . (+ 1)
    -- Reinhard Zumkeller, Jul 29 2014
    
  • Magma
    [Valuation(n+1, 2) mod 2: n in [0..100]]; // Vincenzo Librandi, Jul 20 2016
    
  • Maple
    nmax:=104: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 0 to ceil(nmax/(p+2))+1 do a((2*n+1)*2^p-1) := p mod 2 od: od: seq(a(n), n=0..nmax); # Johannes W. Meijer, Feb 02 2013
    # second Maple program:
    a:= proc(n) a(n):= `if`(n::even, 0, 1-a((n-1)/2)) end:
    seq(a(n), n=0..125);  # Alois P. Heinz, Mar 20 2019
  • Mathematica
    Nest[ Flatten[ # /. {0 -> {1, 0}, 1 -> {0, 0}}] &, {1}, 7] (* Robert G. Wilson v, Mar 05 2005 *)
    {{0}}~Join~SubstitutionSystem[{0 -> {0, 1}, 1 -> {0, 0}}, {1}, 6] // Flatten (* Michael De Vlieger, Aug 15 2016 *)
  • PARI
    a(n)=valuation(n+1,2)%2 \\ Ralf Stephan, Nov 11 2013
    
  • Python
    def A096268(n): return (~(n+1)&n).bit_length()&1 # Chai Wah Wu, Jan 09 2023

Formula

Recurrence: a(2*n) = 0, a(4*n+1) = 1, a(4*n+3) = a(n). - Ralf Stephan, Dec 11 2004
The recurrence may be extended backwards, with a(-1) = 1. - S. I. Ben-Abraham, Apr 01 2013
a(n) = 1 - A035263(n-1). - Reinhard Zumkeller, Aug 16 2006
Dirichlet g.f.: zeta(s)/(1+2^s). - Ralf Stephan, Jun 17 2007
Let T(x) be the g.f., then T(x) + T(x^2) = x^2/(1-x^2). - Joerg Arndt, May 11 2010
Let 2^k||n+1. Then a(n)=1 if k is odd, a(n)=0 if k is even. - Vladimir Shevelev, Aug 25 2010
a(n) = A007814(n+1) mod 2. - Robert G. Wilson v, Jan 18 2012
a((2*n+1)*2^p-1) = p mod 2, p >= 0 and n >= 0. - Johannes W. Meijer, Feb 02 2013
a(n) = A056832(n+1) - 1. - Reinhard Zumkeller, Jul 29 2014
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/3. = Amiram Eldar, Sep 18 2022

Extensions

Corrected by Jeremy Gardiner, Dec 12 2004
More terms from Robert G. Wilson v, Feb 26 2005

A007413 A squarefree (or Thue-Morse) ternary sequence: closed under 1->123, 2->13, 3->2. Start with 1.

Original entry on oeis.org

1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3
Offset: 1

Views

Author

Keywords

Comments

a(n)=2 if and only if n-1 is in A079523. - Benoit Cloitre, Mar 10 2003
Partial sums modulo 4 of the sequence 1, a(1), a(1), a(2), a(2), a(3), a(3), a(4), a(4), a(5), a(5), a(6), a(6), ... - Philippe Deléham, Mar 04 2004
To construct the sequence: start with 1 and concatenate 4 -1 = 3: 1, 3, then change the last term (2 -> 1, 3 ->2 ) gives 1, 2. Concatenate 1, 2 with 4 -1 = 3, 4 - 2 = 2: 1, 2, 3, 2 and change the last term: 1, 2, 3, 1. Concatenate 1, 2, 3, 1 with 4 - 1 = 3, 4 - 2 = 2, 4 - 3 = 1, 4 - 1 = 3: 1, 2, 3, 1, 3, 2, 1, 3 and change the last term: 1, 2, 3, 1, 3, 2, 1, 2 etc. - Philippe Deléham, Mar 04 2004
To construct the sequence: start with the Thue-Morse sequence A010060 = 0, 1, 1, 0, 1, 0, 0, 1, ... Then change 0 -> 1, 2, 3, and 1 -> 3, 2, 1, gives: 1, 2, 3, , 3, 2, 1, ,3, 2, 1, , 1, 2, 3, , 3, 2, 1, , ... and fill in the successive holes with the successive terms of the sequence itself. - _Philippe Deléham, Mar 04 2004
To construct the sequence: to insert the number 2 between the A003156(k)-th term and the (1 + A003156(k))-th term of the sequence 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ... - Philippe Deléham, Mar 04 2004
Conjecture. The sequence is formed by the numbers of 1's between every pair of consecutive 2's in A076826. - Vladimir Shevelev, May 31 2009

Examples

			Here are the first 5 stages in the construction of this sequence, together with Mma code, taken from Keranen's article. His alphabet is a,b,c rather than 1,2,3.
productions = {"a" -> "abc ", "b" -> "ac ", "c" -> "b ", " " -> ""};
NestList[g, "a", 5] // TableForm
a
abc
abc ac b
abc ac b abc b ac
abc ac b abc b ac abc ac b ac abc b
abc ac b abc b ac abc ac b ac abc b abc ac b abc b ac abc b abc ac b ac
		

References

  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. Thue, Über unendliche Zeichenreihen, Norske Vid. Selsk. Skr. I. Mat. Nat. Kl. Christiania, No. 7 (1906), 1-22.

Crossrefs

First differences of A000069.
Equals A036580(n-1) + 1.

Programs

  • Mathematica
    Nest[ Flatten[ # /. {1 -> {1, 2, 3}, 2 -> {1, 3}, 3 -> {2}}] &, {1}, 7] (* Robert G. Wilson v, May 07 2005 *)
    2 - Differences[ThueMorse[Range[0, 100]]] (* Paolo Xausa, Oct 25 2024 *)
  • PARI
    {a(n) = if( n<1 || valuation(n, 2)%2, 2, 2 + (-1)^subst( Pol(binary(n)), x,1))};
    
  • Python
    def A007413(n): return 2-(n.bit_count()&1)+((n-1).bit_count()&1) # Chai Wah Wu, Mar 03 2023

Formula

a(n) modulo 2 = A035263(n). a(A036554(n)) = 2. a(A003159(n)) = 1 if n odd. a(A003159(n)) = 3 if n even. a(n) = A033485(n) mod 4. a(n) = 4 - A036585(n-1). - Philippe Deléham, Mar 04 2004
a(n) = 2 - A029883(n) = 3 - A036577(n). - Philippe Deléham, Mar 20 2004
For n>=1, we have: 1) a(A108269(n))=A010684(n-1); 2) a(A079523(n))=A010684(n-1); 3) a(A081706(2n))=A010684(n). - Vladimir Shevelev, Jun 22 2009

A316826 Image of 3 under repeated application of the morphism 3 -> 3,2, 2 -> 1,0,2,0,1,2, 1 -> 1,0,1,2, 0 -> 0,2.

Original entry on oeis.org

3, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0
Offset: 0

Views

Author

N. J. A. Sloane, Jul 14 2018

Keywords

Comments

A word that is pure morphic and uniform morphic, but neither pure uniform morphic, nor primitive morphic, nor recurrent.

Crossrefs

Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.
Cf. A036577.

Programs

  • Maple
    S:= [3=(3,2), 2 = (1,0,2,0,1,2), 1 = (1,0,1,2), 0 = (0,2)]:
    A:= [3]:
    for iter from 1 do
      Ap:= subs(S,A);
      if nops(Ap) > 100 then Ap:= Ap[1..100] fi;
      if Ap = A then break fi;
      A:= Ap
    od:
    A; # Robert Israel, Jul 30 2020
  • Mathematica
    SubstitutionSystem[{3 -> {3, 2}, 2 -> {1, 0, 2, 0, 1, 2}, 1 -> {1, 0, 1, 2}, 0 -> {0, 2}}, {3}, 4] // Last (* Jean-François Alcover, Nov 11 2018 *)

A316344 An example of a word that is uniform morphic, but neither pure morphic, primitive morphic, nor recurrent.

Original entry on oeis.org

2, 2, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2
Offset: 0

Views

Author

N. J. A. Sloane, Jul 14 2018

Keywords

Crossrefs

Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.
Cf. A036577.

Programs

  • Mathematica
    Join[{2, 2}, Differences[ThueMorse[Range[2, 100]]] + 1] (* Paolo Xausa, Jul 17 2025 *)

Formula

From Zhuorui He, Jul 11 2025: (Start)
a(n) = A010060(2*n+2) + A010060(max(2*n+1,4)).
a(n) = A036577(n+1) except a(1) = 2. (End)

Extensions

More terms from Jack W Grahl, Jul 23 2018

A091855 Odious numbers (see A000069) in A003159.

Original entry on oeis.org

1, 4, 7, 11, 13, 16, 19, 21, 25, 28, 31, 35, 37, 41, 44, 47, 49, 52, 55, 59, 61, 64, 67, 69, 73, 76, 79, 81, 84, 87, 91, 93, 97, 100, 103, 107, 109, 112, 115, 117, 121, 124, 127, 131, 133, 137, 140, 143, 145, 148, 151, 155, 157, 161, 164, 167, 171, 173, 176, 179, 181
Offset: 1

Views

Author

Philippe Deléham, Mar 16 2004

Keywords

Comments

Also n such that A033485(n) == 1 (mod 4); see A007413.
Also n such that A029883(n-1) = 1, A036577(n-1) = 2, A036585(n-1) = 3. - Philippe Deléham, Mar 25 2004
The number of odd numbers before the n-th even number in this sequence is a(n). - Philippe Deléham, Mar 27 2004
Numbers n such that {A010060(n-1), A010060(n)}={0,1} where A010060 is the Thue-Morse sequence. - Benoit Cloitre, Jun 16 2006
Positive integers not of the form n+A010060(n). - Jeffrey Shallit, Feb 13 2024

Programs

Formula

a(n) = A003159(2n-1) = A036554(2n-1)/2.
a(n) is asymptotic to 3*n - Benoit Cloitre, Mar 22 2004
A050292(a(n)) = 2n - 1. - Philippe Deléham, Mar 26 2004

Extensions

More terms from Benoit Cloitre, Mar 22 2004

A029883 First differences of Thue-Morse sequence A001285.

Original entry on oeis.org

1, 0, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1, 0, -1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Also first differences of {0,1} Thue-Morse sequence A010060.- N. J. A. Sloane, Jan 05 2021
Fixed point of the morphism a->abc, b->ac, c->b, with a = 1, b = 0, c = -1, starting with a(1) = 1. - Philippe Deléham
From Thomas Anton, Sep 22 2020: (Start)
This sequence, interpreted as an infinite word, is squarefree.
Let & represent concatenation. For a word w of integers, let -w be the same word with each symbol negated. Then, starting with the empty word, this sequence can be obtained by iteratively applying the transformation T(w) = w & 1 & -w & 0 & -w & -1 & w. (End)

Crossrefs

Apart from signs, same as A035263. Cf. A001285, A010060, A036554, A091785, A091855.
a(n+1) = A036577(n) - 1 = A036585(n) - 2.

Programs

  • Mathematica
    Nest[ Function[ l, {Flatten[(l /. {0 -> {1, -1}, 1 -> {1, 0, -1}, -1 -> {0}})]}], {1}, 7] (* Robert G. Wilson v, Feb 26 2005 *)
    ThueMorse /@ Range[0, 105] // Differences (* Jean-François Alcover, Oct 15 2019 *)
  • PARI
    a(n)=if(n<1||valuation(n,2)%2,0,-(-1)^subst(Pol(binary(n)),x,1)) /* Michael Somos, Jul 08 2004 */
    
  • PARI
    a(n)=hammingweight(n)%2-hammingweight(n-1)%2 \\ Charles R Greathouse IV, Mar 26 2013
    
  • Python
    def A029883(n): return (bin(n).count('1')&1)-(bin(n-1).count('1')&1) # Chai Wah Wu, Mar 03 2023

Formula

Recurrence: a(4*n) = a(n), a(4*n+1) = a(2*n+1), a(4*n+2) = 0, a(4*n+3) = -a(2*n+1), starting a(1) = 1.
a(n) = 2 - A007413(n). a(A036554(n)) = 0; a(A091785(n)) = -1; a(A091855(n)) = 1. - Philippe Deléham, Mar 20 2004
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = -v+w+u^2-v^2+2*w^2-2*u*w. - Michael Somos, Jul 08 2004

Extensions

Edited by Ralf Stephan, Dec 09 2004

A036585 Ternary Thue-Morse sequence: closed under a->abc, b->ac, c->b.

Original entry on oeis.org

3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1
Offset: 1

Views

Author

Keywords

Comments

First differences of A001969. Observed by Franklin T. Adams-Watters, proved by Max Alekseyev, Aug 30 2006

References

  • M. Lothaire, Combinatorics on Words. Addison-Wesley, Reading, MA, 1983, p. 26.

Crossrefs

Programs

  • Haskell
    a036585 n = a036585_list !! (n-1)
    a036585_list = 3 : concat (map f a036585_list)
    where f 1 = [1,2,3]; f 2 = [1,3]; f 3 = [2]
    -- Reinhard Zumkeller, Oct 31 2012
    
  • Mathematica
    Differences[ThueMorse[Range[0, 100]]] + 2 (* Paolo Xausa, Oct 25 2024 *)
  • PARI
    a(n)=if(n<1 || valuation(n,2)%2,2,2-(-1)^subst(Pol(binary(n)),x,1))
    
  • Python
    def A036585(n): return 2+(n.bit_count()&1)-((n-1).bit_count()&1) # Chai Wah Wu, Mar 03 2023

Formula

a(n) = A001969(n+1) - A001969(n). - Franklin T. Adams-Watters, Aug 28 2006
a(n) = A029883(n) + 2 = A036577(n) + 1.

A036580 Ternary Thue-Morse sequence: closed under a->abc, b->ac, c->b.

Original entry on oeis.org

0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2
Offset: 0

Views

Author

Keywords

Comments

0 is a, 1 is b and 2 is c. - Robert G. Wilson v, Jul 30 2018

References

  • M. Lothaire, Combinatorics on Words. Addison-Wesley, Reading, MA, 1983, p. 26.

Crossrefs

A007413(n+1) - 1.
See A036577 for another version.

Programs

  • Mathematica
    Nest[Flatten[# /. {0 -> {0, 1, 2}, 1 -> {0, 2}, 2 -> {1}}] &, {1}, 7] // Most (* Robert G. Wilson v, Jul 30 2018, corrected by Paolo Xausa, Jul 21 2025 *)
    1 - Differences[ThueMorse[Range[0,100]]] (* Paolo Xausa, Jul 21 2025 *)

A091785 Evil numbers (see A001969) in A003159.

Original entry on oeis.org

3, 5, 9, 12, 15, 17, 20, 23, 27, 29, 33, 36, 39, 43, 45, 48, 51, 53, 57, 60, 63, 65, 68, 71, 75, 77, 80, 83, 85, 89, 92, 95, 99, 101, 105, 108, 111, 113, 116, 119, 123, 125, 129, 132, 135, 139, 141, 144, 147, 149, 153, 156, 159, 163, 165, 169, 172, 175, 177, 180, 183
Offset: 1

Views

Author

Philippe Deléham, Mar 16 2004

Keywords

Comments

Also n such that A033485(n) == 3 (mod 4); see A007413.
Also n such that A029883(n-1) = -1, A036577(n-1) = 0, A036585(n-1) = 1. - Philippe Deléham, Mar 25 2004
The number of odd numbers before the n-th even number in this sequence is a(n). - Philippe Deléham, Mar 27 2004
Numbers n such that {A010060(n-1), A010060(n)}={1,0} where A010060 is the Thue-Morse sequence. - Benoit Cloitre, Jun 16 2006

Programs

Formula

a(n) = A003159(2*n) = A036554(2*n)/2.
a(n) is asymptotic to 3*n. - Benoit Cloitre, Mar 22 2004
A050292(a(n)) = 2n. - Philippe Deléham, Mar 26 2004

Extensions

More terms from Benoit Cloitre, Mar 22 2004
Showing 1-10 of 17 results. Next