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 11 results. Next

A187180 Parse the infinite string 0101010101... into distinct phrases 0, 1, 01, 010, 10, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8, 9, 8, 9, 10, 11, 10, 11, 12, 13, 12, 13, 14, 15, 14, 15, 16, 17, 16, 17, 18, 19, 18, 19, 20, 21, 20, 21, 22, 23, 22, 23, 24, 25, 24, 25, 26, 27, 26, 27, 28, 29, 28, 29, 30, 31, 30, 31, 32, 33, 32, 33, 34, 35, 34, 35, 36, 37, 36, 37, 38, 39, 38, 39, 40, 41, 40, 41, 42, 43, 42, 43, 44, 45, 44, 45, 46, 47, 46, 47, 48, 49, 48, 49, 50, 51, 50, 51, 52, 53, 52, 53, 54, 55, 54, 55, 56, 57, 56, 57, 58, 59, 58, 59, 60, 61
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Examples

			The sequence begins
   1   1
   2   3   2   3
   4   5   4   5
   6   7   6   7
   8   9   8   9
  10  11  10  11 ...
		

Crossrefs

See A187180-A187188 for alphabets of size 2 through 10.
Essentially the same as A106249 and A018837.

Programs

  • Maple
    1,1,seq(op(2*i*[1,1,1,1]+[0,1,0,1]), i=1..100); # Robert Israel, Oct 15 2015
  • Mathematica
    Join[{1},LinearRecurrence[{1, 0, 0, 1, -1},{1, 2, 3, 2, 3},119]] (* Ray Chandler, Aug 26 2015 *)
    CoefficientList[Series[(x^5 - 2 x^4 + x^3 + x^2 + 1)/((x - 1)^2 (x + 1) (x^2 + 1)), {x, 0, 150}], x] (* Vincenzo Librandi, Oct 16 2015 *)
  • PARI
    a(n) = if(n==1, 1, (1 + (-1)^n + (1-I)*(-I)^n + (1+I)*I^n + 2*n) / 4); \\ Colin Barker, Oct 15 2015
    
  • PARI
    Vec(x*(x^5-2*x^4+x^3+x^2+1) / ((x-1)^2*(x+1)*(x^2+1)) + O(x^100)) \\ Colin Barker, Oct 15 2015

Formula

Consider more generally the string 012...k012...k012...k012...k01... with an alphabet of size B, where k = B-1. The sequence begins with B 1's, and thereafter is quasi-periodic with period B^2, and increases by B in each period.
For the present example, where B=2, the sequence begins with two 1's and thereafter increases by 2 in each block of 4: (1,1) (2,3,2,3), (4,5,4,5), (6,7,6,7), ...
From Colin Barker, Oct 15 2015: (Start)
a(n) = (1+(-1)^n+(1-i)*(-i)^n+(1+i)*i^n+2*n)/4 for n>1, where i = sqrt(-1).
G.f.: x*(x^5-2*x^4+x^3+x^2+1) / ((x-1)^2*(x+1)*(x^2+1)). (End)
From Wesley Ivan Hurt, May 03 2021: (Start)
a(n) = a(n-1)+a(n-4)-a(n-5).
a(n) = floor((n+1+(-1)^floor((n+1)/2))/2) for n > 1. (End)

A109337 Parse the Thue-Morse sequence (A010060) using the Ziv-Lempel encoding as described in A106182; sequence gives lengths of successive phrases.

Original entry on oeis.org

1, 1, 2, 3, 2, 2, 3, 4, 2, 3, 3, 5, 3, 3, 4, 4, 4, 5, 4, 4, 6, 5, 6, 4, 4, 5, 6, 7, 5, 7, 6, 5, 4, 7, 6, 7, 5, 7, 5, 6, 7, 6, 6, 8, 5, 8, 4, 6, 7, 5, 8, 5, 6, 7, 6, 9, 7, 8, 6, 5, 8, 6, 7, 7, 7, 6, 8, 8, 8, 9, 7, 10, 6, 9, 9, 7, 8, 10, 8, 8, 9, 8, 9, 8, 9, 7, 9, 8, 7, 10, 9, 10, 8, 9, 7, 8, 9, 8, 9, 11, 9, 11
Offset: 1

Views

Author

N. J. A. Sloane, Aug 24 2005

Keywords

Examples

			The parsing into phrases gives 0, 1, 10, 100, 11, 00, 101, 1010, 01, 011, 001, 10100, ... with lengths 1,1,2,3,2,2,3,4,2,3,3,5,...
		

Crossrefs

Extensions

Terms a(13)-a(102) from John W. Layman, Sep 16 2010

A187199 Parse the Kolakoski sequence A000002 into distinct phrases 1, 2, 21, 12, 122, 1221, 121, 12212, 11, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 3, 5, 2, 3, 3, 4, 6, 3, 6, 4, 2, 5, 4, 6, 4, 3, 5, 7, 4, 5, 7, 5, 4, 6, 6, 5, 5, 6, 6, 4, 8, 5, 5, 9, 10, 7, 9, 8, 7, 5, 8, 11, 5, 6, 6, 7, 8, 7, 6, 6, 7, 7, 7, 9, 4, 4, 8, 8, 10, 5, 7, 8, 7, 9, 8, 12, 6, 10, 6, 8, 6, 10, 7, 9, 9, 8, 7, 8, 7, 9, 8, 7, 8, 8, 9, 9, 10, 8, 10, 9, 8, 11, 5, 6
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Crossrefs

Programs

  • PARI
    \\ See Links section.

A187187 Parse the infinite string 0123456780123456780123456780... into distinct phrases 0, 1, 2, 3, 4, 5, 6, 7, 8, 01, 23, 45, 67, 80, 12, 34, 56, 78, 012, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 6, 6, 6, 7, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 13, 12, 12, 12, 13, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Comments

See A187180 for details.

Crossrefs

See A187180-A187188 for alphabets of size 2 through 10.

Formula

After the initial block of nine 1's, the sequence is quasi-periodic with period 81, increasing by 9 after each block.

A187181 Parse the infinite string 012012012012... into distinct phrases 0, 1, 2, 01, 20, 12, 012, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 3, 4, 3, 4, 5, 5, 5, 6, 7, 6, 7, 6, 7, 8, 8, 8, 9, 10, 9, 10, 9, 10, 11, 11, 11, 12, 13, 12, 13, 12, 13, 14, 14, 14, 15, 16, 15, 16, 15, 16, 17, 17, 17, 18, 19, 18, 19, 18, 19, 20, 20, 20, 21, 22, 21, 22, 21, 22, 23, 23, 23, 24, 25, 24, 25, 24, 25, 26, 26, 26, 27, 28, 27, 28, 27, 28, 29, 29, 29, 30, 31, 30, 31, 30, 31, 32, 32, 32, 33, 34, 33, 34
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Comments

See A187180 for details.

Examples

			The sequence begins
1   1   1
2   2   2   3   4   3   4   3   4
5   5   5   6   7   6   7   6   7
8   8   8   9  10   9  10   9  10
11  11  11  12  13  12  13  12  13
14  14  14  15  16  15  16  15  16   ...
		

Crossrefs

See A187180-A187188 for alphabets of size 2 through 10.

Programs

  • Mathematica
    Join[{1, 1},LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 1, -1},{1, 2, 2, 2, 3, 4, 3, 4, 3, 4},98]] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    Vec(x*(x^11-x^10-x^8+x^7+x^6+x^3+1)/((x-1)^2*(x^2+x+1)*(x^6+x^3+1)) + O(x^100)) \\ Colin Barker, Nov 05 2015

Formula

After the initial block of three 1's, the sequence is quasi-periodic with period 9, increasing by 3 after each block.
From Colin Barker, Nov 05 2015: (Start)
a(n) = a(n-1) + a(n-9) - a(n-10) for n>12.
G.f.: x*(x^11-x^10-x^8+x^7+x^6+x^3+1) / ((x-1)^2*(x^2+x+1)*(x^6+x^3+1)).
(End)

A187182 Parse the infinite string 0123012301230123... into distinct phrases 0, 1, 2, 3, 01, 23, 012, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 2, 2, 3, 3, 3, 4, 5, 4, 5, 4, 5, 4, 5, 6, 6, 7, 6, 6, 7, 7, 7, 8, 9, 8, 9, 8, 9, 8, 9, 10, 10, 11, 10, 10, 11, 11, 11, 12, 13, 12, 13, 12, 13, 12, 13, 14, 14, 15, 14, 14, 15, 15, 15, 16, 17, 16, 17, 16, 17, 16, 17, 18, 18, 19, 18, 18, 19, 19, 19, 20, 21, 20, 21, 20, 21, 20, 21, 22, 22, 23, 22, 22, 23, 23, 23, 24, 25, 24, 25, 24, 25, 24, 25
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Comments

See A187180 for details.

Examples

			The sequence is quasi-periodic with period 16, increasing by 4 after each block:
1   1   1   1
2   2   3   2   2   3   3   3   4   5   4   5   4   5   4   5
6   6   7   6   6   7   7   7   8   9   8   9   8   9   8   9
10  10  11  10  10  11  11  11  12  13  12  13  12  13  12  13
14  14  15  14  14  15  15  15  16  17  16  17  16  17  16  17
...
		

Crossrefs

See A187180-A187188 for alphabets of size 2 through 10.

Programs

  • Mathematica
    Join[{1, 1, 1},LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1},{1, 2, 2, 3, 2, 2, 3, 3, 3, 4, 5, 4, 5, 4, 5, 4, 5},97]] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    Vec(x*(1 + x^4 + x^6 - x^7 + x^9 + x^12 + x^13 - x^14 + x^15 - 2*x^16 + x^17 - x^18 + x^19) / ((1 - x)^2*(1 + x)*(1 + x^2)*(1 + x^4)*(1 + x^8)) + O(x^80)) \\ Colin Barker, Jan 31 2020

Formula

From Colin Barker, Jan 31 2020: (Start)
G.f.: x*(1 + x^4 + x^6 - x^7 + x^9 + x^12 + x^13 - x^14 + x^15 - 2*x^16 + x^17 - x^18 + x^19) / ((1 - x)^2*(1 + x)*(1 + x^2)*(1 + x^4)*(1 + x^8)).
a(n) = a(n-1) + a(n-16) - a(n-17) for n>20.
(End)

A187183 Parse the infinite string 012340123401234012340... into distinct phrases 0, 1, 2, 3, 4, 01, 23, 40, 12, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 16, 15, 16, 15, 16, 15, 16, 15, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 21, 20, 21, 20
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Comments

See A187180 for details.

Crossrefs

See A187180-A187188 for alphabets of size 2 through 10.

Programs

  • Mathematica
    Join[{1, 1, 1, 1},LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1},{1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6},96]] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    Vec(x*(1 + x^5 + x^10 + x^15 + x^20 + x^21 - x^22 + x^23 - x^24 - x^26 + x^27 - x^28 + x^29) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)*(1 + x^5 + x^10 + x^15 + x^20)) + O(x^80)) \\ Colin Barker, Jan 31 2020

Formula

After the initial block of five 1's, the sequence is quasi-periodic with period 25, increasing by 5 after each block.
From Colin Barker, Jan 31 2020: (Start)
G.f.: x*(1 + x^5 + x^10 + x^15 + x^20 + x^21 - x^22 + x^23 - x^24 - x^26 + x^27 - x^28 + x^29) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)*(1 + x^5 + x^10 + x^15 + x^20)).
a(n) = a(n-1) + a(n-25) - a(n-26) for n>30.
(End)

A187184 Parse the infinite string 0123450123450123450... into distinct phrases 0, 1, 2, 3, 4, 5, 01, 23, 45, 012, 34, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 2, 2, 3, 4, 3, 3, 4, 3, 3, 4, 5, 4, 4, 4, 5, 5, 5, 5, 5, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 8, 8, 8, 9, 8, 8, 8, 9, 10, 9, 9, 10, 9, 9, 10, 11, 10, 10, 10, 11, 11, 11, 11, 11, 12, 13, 12, 13, 12, 13, 12, 13, 12, 13, 12, 13, 14, 14, 14, 15, 14, 14, 14, 15, 16, 15, 15, 16, 15, 15, 16, 17, 16, 16, 16, 17, 17, 17, 17, 17, 18, 19, 18, 19, 18, 19, 18, 19, 18, 19, 18, 19, 20, 20, 20, 21, 20, 20
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Comments

See A187180 for details.

Crossrefs

See A187180-A187188 for alphabets of size 2 through 10.

Programs

  • Mathematica
    Join[{1, 1, 1, 1, 1},LinearRecurrence[{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, 1, -1},{1, 2, 2, 2, 3, 2, 2, 2, 3, 4, 3, 3, 4, 3, 3, 4, 5, 4, 4, 4, 5, 5, 5, 5, 5, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7},115]] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    Vec(x*(1 + x^6 + x^9 - x^10 + x^13 + x^14 - x^15 + x^17 - x^18 + x^20 + x^21 - x^22 + x^25 + x^30 + x^31 - x^32 + x^33 - x^34 + x^35 - 2*x^36 + x^37 - x^38 + x^39 - x^40 + x^41) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)*(1 - x^3 + x^6)*(1 + x^3 + x^6)*(1 - x^6 + x^12)) + O(x^80)) \\ Colin Barker, Jan 31 2020

Formula

After the initial block of six 1's, the sequence is quasi-periodic with period 36, increasing by 6 after each block.
From Colin Barker, Jan 31 2020: (Start)
G.f.: x*(1 + x^6 + x^9 - x^10 + x^13 + x^14 - x^15 + x^17 - x^18 + x^20 + x^21 - x^22 + x^25 + x^30 + x^31 - x^32 + x^33 - x^34 + x^35 - 2*x^36 + x^37 - x^38 + x^39 - x^40 + x^41) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)*(1 - x^3 + x^6)*(1 + x^3 + x^6)*(1 - x^6 + x^12)).
a(n) = a(n-1) + a(n-36) - a(n-37) for n>42.
(End)

A187185 Parse the infinite string 0123456012345601234560... into distinct phrases 0, 1, 2, 3, 4, 5, 6, 01, 23, 45, 60, 12, 34, 56, 012, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 15, 14, 15, 14, 15, 14, 15, 14, 15, 14, 15, 14, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Comments

See A187180 for details.

Crossrefs

See A187180-A187188 for alphabets of size 2 through 10.

Programs

  • Mathematica
    Join[{1, 1, 1, 1, 1, 1},LinearRecurrence[{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, 0, 0, 0, 0, 0, 0, 1, -1},{1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8},114]] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    Vec(x*(1 + x^7 + x^14 + x^21 + x^28 + x^35 + x^42 + x^43 - x^44 + x^45 - x^46 + x^47 - x^48 - x^50 + x^51 - x^52 + x^53 - x^54 + x^55) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)*(1 + x^7 + x^14 + x^21 + x^28 + x^35 + x^42)) + O(x^80)) \\ Colin Barker, Jan 31 2020

Formula

After the initial block of seven 1's, the sequence is quasi-periodic with period 49, increasing by 7 after each block.
From Colin Barker, Jan 31 2020: (Start)
G.f.: x*(1 + x^7 + x^14 + x^21 + x^28 + x^35 + x^42 + x^43 - x^44 + x^45 - x^46 + x^47 - x^48 - x^50 + x^51 - x^52 + x^53 - x^54 + x^55) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)*(1 + x^7 + x^14 + x^21 + x^28 + x^35 + x^42)).
a(n) = a(n-1) + a(n-49) - a(n-50) for n>56.
(End)

A187186 Parse the infinite string 0123456701234567012345670... into distinct phrases 0, 1, 2, 3, 4, 5, 6, 7, 01, 23, 45, 67, 012, 34, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 13, 12, 12, 13, 12, 12, 13, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Comments

See A187180 for details.

Crossrefs

See A187180-A187188 for alphabets of size 2 through 10.

Formula

After the initial block of eight 1's, the sequence is quasi-periodic with period 64, increasing by 8 after each block.
Showing 1-10 of 11 results. Next