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.

Previous Showing 11-20 of 67 results. Next

A026491 a(n) = least k > a(n-1) such that A001285(k-1) = A001285(n-1) for n >= 1.

Original entry on oeis.org

1, 4, 5, 8, 10, 12, 13, 16, 17, 20, 21, 24, 26, 28, 29, 32, 34, 36, 37, 40, 42, 44, 45, 48, 49, 52, 53, 56, 58, 60, 61, 64, 65, 68, 69, 72, 74, 76, 77, 80, 81, 84, 85, 88, 90, 92, 93, 96, 98, 100, 101, 104, 106, 108, 109, 112, 113, 116, 117
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    N:= 200: # for terms <= N
    S:= StringTools:-ThueMorse(N):
    R:= 1: r:= 1:
    for n from 1 do
      j:= SearchText(S[n],S,r+1..-1);
      if j = 0 then break fi;
      R:= R, r+j;
      r:= r+j;
      if r >= N then break fi;
    od:
    R; # Robert Israel, Apr 11 2019
    # alternative
    A026491 := proc(n)
        option remember ;
        local f,k ;
        if n = 0 then
            1;
        else
            f := A001285(n-1) ;
            for k from procname(n-1)+1 do
                if A001285(k-1) = f then
                    return k;
                end if;
            end do:
        end if;
    end proc:
    seq(A026491(n),n=0..40) ; # R. J. Mathar, Jun 24 2021
  • Mathematica
    a[n_] := a[n] = If[n==0, 1, For[k = a[n-1]+1, True, k++, If[ThueMorse[k-1]==ThueMorse[n-1], Return[k]]]];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Sep 16 2022 *)

Formula

a(n+1)-a(n) = A171900(n+2) for n>=1. - Michel Dekking, Apr 11 2019

Extensions

Clarified NAME with respect to A001285 offsets. - R. J. Mathar, Jun 24 2021

A026517 a(n) = t(5n), where t = A001285 (Thue-Morse sequence).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A001285.

Programs

Extensions

Name and Pari code corrected by Sean A. Irvine, Oct 05 2019

A080815 Successive strings in the construction of the Thue-Morse sequence A001285.

Original entry on oeis.org

1, 2, 21, 2112, 21121221, 2112122112212112, 21121221122121121221211221121221, 2112122112212112122121122112122112212112211212212112122112212112
Offset: 1

Views

Author

N. J. A. Sloane, Mar 26 2003

Keywords

References

  • A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 6.

Crossrefs

Cf. A080814.

Programs

  • Mathematica
    Join[{1},Map[FromDigits,SubstitutionSystem[{1->{1,2},2->{2,1}},{2},7]]] (* Paolo Xausa, Dec 24 2023 *)

Formula

Drop first half of each word in A080814.

Extensions

a(8) from Paolo Xausa, Dec 24 2023

A225186 Squares in the Thue-Morse word A001285.

Original entry on oeis.org

11, 22, 1212, 2121, 121121, 212212, 12211221, 21122112, 122112122112, 211221211221, 1221211212212112, 2112122121121221, 122121121221122121121221, 211212212112211212212112, 12212112211212211221211221121221, 21121221122121122112122112212112
Offset: 1

Views

Author

N. J. A. Sloane, May 04 2013

Keywords

Comments

A square in an infinite word w is a factor of the form uu, where u has finite length.
Consists of 11, 22, 121121, 212212 and their repeated images under the morphism 1 -> 12, 2 -> 21.
Replacing {1,2} by {0,1} gives the squares in A010060.

Crossrefs

Cf. A001285, A020060, A225188 (square roots).

A230958 Boustrophedon transform of Thue-Morse sequence A001285.

Original entry on oeis.org

1, 3, 7, 15, 39, 127, 480, 2143, 10907, 62495, 397814, 2785861, 21282228, 176133285, 1569817724, 14990658724, 152693582275, 1652531857935, 18936620009722, 229053108410969, 2916394751599614, 38989325834726043, 546070266163669664, 7995699956778626764
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 04 2013

Keywords

Crossrefs

Programs

  • Haskell
    a230958 n = sum $ zipWith (*) (a109449_row n) $ map fromIntegral a001285_list
    
  • Mathematica
    T[n_, k_] := (n!/k!) SeriesCoefficient[(1 + Sin[x])/Cos[x], {x, 0, n - k}];
    tm[n_] := Mod[Sum[Mod[Binomial[n, k], 2], {k, 0, n}], 3];
    Table[Sum[T[n, k] tm[k], {k, 0, n}], {n, 0, 23}] (* Jean-François Alcover, Jul 23 2019 *)
  • Python
    from itertools import accumulate, count, islice
    def A230958_gen(): # generator of terms
        blist = tuple()
        for i in count(0):
            yield (blist := tuple(accumulate(reversed(blist), initial=2 if i.bit_count()&1 else 1)))[-1]
    A230958_list = list(islice(A230958_gen(),30)) # Chai Wah Wu, Apr 17 2023

Formula

a(n) = Sum_{k=0..n} A109449(n,k)*A001285(k).

A029878 Inverse Euler transform of {A001285(0), A001285(1), ...} where A001285(n) is Thue-Morse sequence.

Original entry on oeis.org

1, 1, 0, -2, 1, 0, -1, 1, 2, -3, -2, 5, 1, -6, 1, 8, -6, -10, 14, 7, -25, 8, 36, -34, -41, 72, 25, -125, 29, 187, -150, -216, 361, 137, -657, 159, 977, -810, -1135, 1937, 752, -3558, 792, 5361, -4327, -6318, 10641, 4281, -19848, 4286
Offset: 1

Views

Author

Keywords

Examples

			(1-x)^(-1)*(1-x^2)^(-1)*(1-x^4)^2*(1-x^5)^(-1)* ... = 1 + x + 2*x^2 + 2*x^3 + x^4 + 2*x^5 + ... .
		

Crossrefs

Formula

Product_{k>=1} (1-x^k)^(-a(k)) = 1 + Sum_{k>=1} A001285(k-1)*x^k. - Seiichi Manyama, Jun 25 2018

Extensions

Name edited by Seiichi Manyama, Jun 25 2018

A214215 List of subwords (or factors) of the Thue-Morse "1,2"-word A001285.

Original entry on oeis.org

1, 2, 11, 12, 21, 22, 112, 121, 122, 211, 212, 221, 1121, 1122, 1211, 1212, 1221, 2112, 2121, 2122, 2211, 2212, 11212, 11221, 12112, 12122, 12211, 12212, 21121, 21122, 21211, 21221, 22112, 22121, 112122, 112211, 112212, 121121, 121122, 121221, 122112, 122121
Offset: 1

Views

Author

N. J. A. Sloane, Jul 10 2012

Keywords

Comments

The number of factors of length m is given by A005942(m).

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local r;
          `if`(n=0, 1, `if`(n<4, 2*n, `if`(irem(n, 2, 'r')=0,
           b(r)+b(r+1), 2*b(r+1))))
        end:
    m:= proc(n) option remember; local r;
          `if`(n=0, 1, `if`(irem(n, 2, 'r')=0, m(r), 3-m(r)))
        end:
    T:= proc(n) local k, s; s:={};
          for k while nops(s)Alois P. Heinz, Jul 19 2012
  • Mathematica
    b[n_] := b[n] = Module[{r}, If[n == 0, 1, If[n < 4, 2n, r = Quotient[n, 2]; If[Mod[n, 2] == 0, b[r] + b[r + 1], 2b[r + 1]]]]];
    m[n_] := m[n] = Module[{r}, If[n == 0, 1, r = Quotient[n, 2]; If[Mod[n, 2] == 0, m[r], 3 - m[r]]]];
    T[n_] := Module[{k, s = {}}, For[k = 1,  Length[s] < b[n], k++, s = s  ~Union~ {FromDigits[#]}& @ Table[m[i], {i, k, k + n - 1}]]; Sort[s]];
    Array[T, 10] // Flatten (* Jean-François Alcover, Nov 22 2020, after Alois P. Heinz *)

A316149 Inverse Euler transform of Thue-Morse sequence A001285.

Original entry on oeis.org

2, -1, -1, 2, -3, 3, 0, -4, 6, -6, 6, -1, -12, 24, -29, 23, 9, -64, 114, -132, 81, 78, -333, 577, -627, 279, 610, -1896, 2979, -2911, 672, 4232, -10754, 15576, -13515, -591, 28098, -61548, 81664, -60408, -27030, 180784, -351081, 425892, -253838, -281760, 1140396, -1995767, 2195952, -930876
Offset: 1

Views

Author

Seiichi Manyama, Jun 25 2018

Keywords

Examples

			(1-x)^(-2)*(1-x^2)*(1-x^3)*(1-x^4)^(-2)* ... = 1 + 2*x + 2*x^2 + x^3 + 2*x^4 + ... .
		

Crossrefs

Programs

  • Maple
    # The function EulerInvTransform is defined in A358451.
    a := EulerInvTransform(A001285):
    seq(a(n), n = 1..50); # Peter Luschny, Nov 21 2022

Formula

Product_{k>=1} (1-x^k)^(-a(k)) = 1 + Sum_{k>=1} A001285(k)*x^k.

A029881 Möbius transform of Thue-Morse sequence A001285 (when shifted once right).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A008683(n/d)*A001285(d-1). - Antti Karttunen, Dec 15 2024

Extensions

Starting offset corrected (from 0 to 1), more terms added and definition clarified by Antti Karttunen, Dec 15 2024

A029884 Second differences of Thue-Morse sequence A001285.

Original entry on oeis.org

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

Views

Author

Keywords

Previous Showing 11-20 of 67 results. Next