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.

User: Thomas L. York

Thomas L. York's wiki page.

Thomas L. York has authored 4 sequences.

A001389 To get the 6th term, for example, note that 5th term has three (10 in ternary!) 1's, one (1) 0, etc., giving 10 1 1 0 1 2 2 1 1 2.

Original entry on oeis.org

2, 12, 1112, 10112, 11102112, 10110122112, 1110211011222112, 10110122110211022112, 1110211011222110122110222112, 10110122110211022110112221101022112, 11102110112221101221102221102110221101110222112
Offset: 1

Keywords

Crossrefs

Cf. A001388.

Programs

  • Mathematica
    a[1]=2; a[n_] := a[n] = FromDigits@ Flatten@ Table[ {IntegerDigits[ Length[e], 3], e[[1]]}, {e, Split[ IntegerDigits[ a[n - 1]]]}]; Array[a, 11] (* Giovanni Resta, Mar 25 2017 *)

Extensions

More terms from Sean A. Irvine, Jul 04 2012

A001391 To get the 3rd term, for example, note that 2nd term has three (11 in binary!) 1's and one (1) 0, giving 11 1 1 0.

Original entry on oeis.org

10, 1110, 11110, 100110, 1110010110, 111100111010110, 100110011110111010110, 1110010110010011011110111010110, 1111001110101100111001011010011011110111010110
Offset: 1

Keywords

Crossrefs

Cf. A001387.

A001387 The binary "look and say" sequence.

Original entry on oeis.org

1, 11, 101, 111011, 11110101, 100110111011, 111001011011110101, 111100111010110100110111011, 100110011110111010110111001011011110101, 1110010110010011011110111010110111100111010110100110111011
Offset: 1

Keywords

Comments

I conjecture that the ratio r(n) of the number of "1"s to the number of "0"s in a(n) converges to 5/3 (or some nearby limit). - Joseph L. Pe, Jan 31 2003
The ratio r(n) of the number of "1"s to the number of "0"s in a(n) actually converges to ((101 - 10*sqrt(93))*a^2 + (139 - 13*sqrt(93))*a - 76)/108, where a = (116 + 12*sqrt(93))^(1/3). This ratio has decimal expansion 1.6657272222676... - Nathaniel Johnston, Nov 07 2010 [Corrected by Kevin J. Gomez, Dec 12 2017]
Reading terms as binary numbers and converting to decimal gives A049190. - Andrey Zabolotskiy, Dec 12 2017
From Jianing Song, Oct 05 2022: (Start)
"000" or "11111" never appear in any a(n). Proof:
When "000" appears for the first time in a(n),
- if it reads as "..00 0's", then a(n-1) must contain at least 4 consecutive 0's, which is impossible;
- if it reads as "...000... 0's" or "...000... 1's", then a(n-1) must contain at least 8 consecutive 0's or at least 8 consecutive 1's.
In conclusion, a(n-1) must contain at least 8 consecutive 1's.
When "11111" appears for the first time in a(n),
- if it reads as "...1111 1's", then a(n-1) must contain at least 15 consecutive 1's, which is impossible;
- if it reads as "...111 1's, 1... 0's", then a(n-1) must contain at least 7 consecutive 1's, which is impossible;
- if it reads as "...11 1's, 11... 0's", then a(n-1) must contain at least 3 consecutive 0's;
- if it reads as "...1 1's, 111... 0's", then a(n-1) must contain at least 7 consecutive 0's;
- if it reads as "... 1's, 1111... 0's", then a(n-1) must contain at least 15 consecutive 0's;
- if it reads as "...11111... 0's" or "...11111... 1's", then a(n-1) must contain at least 31 consecutive 0's or at least 31 consecutive 1's.
In conclusion, a(n-1) must contain at least 3 consecutive 0's. Combining these two results, one can easily show that "000" or "11111" cannot appear. (End)

Examples

			To get the 5th term, for example, note that 4th term has three (11 in binary!) 1's, one (1) 0 and two (10) 1's, giving 11 1 1 0 10 1.
		

Crossrefs

Programs

  • Mathematica
    a[1] := 1; a[n_] := a[n] = FromDigits[Flatten[{IntegerDigits[Length[#],2], First[#]}& /@ Split[IntegerDigits[a[n-1]]]]]; Map[a, Range[20]] (* Peter J. C. Moses, Mar 24 2013 *)
    Nest[Append[#, FromDigits@ Flatten@ Map[Reverse /@ IntegerDigits[Tally@ #, 2] &, Split@ IntegerDigits@ Last@ #]] &, {1}, 9] (* Michael De Vlieger, Dec 12 2017 *)
  • Python
    from itertools import accumulate, groupby, repeat
    def summarize(n, _): return int("".join(bin(len(list(g)))[2:]+k for k, g in groupby(str(n))))
    def aupto(terms): return list(accumulate(repeat(1, terms), summarize))
    print(aupto(11)) # Michael S. Branicky, Sep 18 2022

Extensions

New name from Andrey Zabolotskiy, Dec 13 2017

A001388 Describe the previous term (in base 3)!.

Original entry on oeis.org

1, 11, 21, 1211, 111221, 1012211, 1110112221, 101102110211, 111021101221101221, 1011012211011222110112211, 1110211011222110211022110212221, 10110122110211022110122110222110121110211
Offset: 1

Keywords

Examples

			To get the 6th term, for example, note that the 5th term has three (10 in ternary!) 1's, two (2) 2's and one (1) 1, giving 10 1 2 2 1 1.
		

Crossrefs

Cf. A005150.

Programs

  • Mathematica
    a[1] := 1; a[n_] := a[n] = FromDigits[Flatten[{IntegerDigits[Length[#],3], First[#]}& /@ Split[IntegerDigits[a[n-1]]]]]; Map[a,Range[25]] (* Peter J. C. Moses, Mar 24 2013 *)