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-9 of 9 results.

A007651 Describe the previous term! (method B - initial term is 1).

Original entry on oeis.org

1, 11, 12, 1121, 122111, 112213, 12221131, 1123123111, 12213111213113, 11221131132111311231, 12221231123121133112213111, 1123112131122131112112321222113113, 1221311221113112221131132112213121112312311231
Offset: 1

Views

Author

Keywords

Comments

Method B = 'digit'-indication followed by 'frequency'.

Examples

			The term after 1121 is obtained by saying "1 twice, 2 once, 1 once", which gives 122111.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a007651 = foldl1 (\v d -> 10 * v + d) . map toInteger . a220424_row
    -- Reinhard Zumkeller, Dec 15 2012
    
  • Mathematica
    RunLengthEncode[ x_List ] := (Through[ {First, Length}[ #1 ] ] &) /@ Split[ x ]; LookAndSay[ n_, d_:1 ] := NestList[ Flatten[ Reverse /@ RunLengthEncode[ # ] ] &, {d}, n - 1 ]; F[ n_ ] := LookAndSay[ n, 1 ][ [ n ] ]; Table[ FromDigits[ Reverse[ F[ n ] ] ], {n, 1, 15} ]
    a[1] = 1; a[n_] := a[n] = FromDigits[Flatten[{First[#], Length[#]}&/@Split[IntegerDigits[a[n-1]]]]]; Map[a, Range[25]] (* Peter J. C. Moses, Mar 22 2013 *)
  • Python
    from itertools import accumulate, groupby, repeat
    def summarize(n, _): return int("".join(k+str(len(list(g))) for k, g in groupby(str(n))))
    def aupto(terms): return list(accumulate(repeat(1, terms), summarize))
    print(aupto(13)) # Michael S. Branicky, Sep 18 2022

Formula

a(n) = Sum_{k=1..A005341(n)} A220424(n,k)*10^(A005341(n)-k). - Reinhard Zumkeller, Dec 15 2012

A022470 Describe the previous term! (method B - initial term is 2).

Original entry on oeis.org

2, 21, 2111, 2113, 211231, 2112213111, 211222113113, 21122312311231, 2112223111213112213111, 21122331132111311222113113, 211222321231211331122312311231, 21122331211121311121123212223111213112213111, 21122232112113211131132112213121112331132111311222113113
Offset: 1

Views

Author

Keywords

Comments

Method B = 'digit'-indication followed by 'frequency'.

Examples

			E.g., the term after 2113 is obtained by saying "2 once, 1 twice, 3 once", which gives 211231.
		

Crossrefs

Cf. A006751 (method A).

Programs

  • Mathematica
    a[1] = 2; a[n_] := a[n] = FromDigits[Flatten[{First[#], Length[#]} & /@ Split[IntegerDigits[a[n - 1]]]]]; Map[a,Range[1, 23]] (* Peter J. C. Moses, Mar 22 2013 *)
  • Python
    from itertools import accumulate, groupby, repeat
    def summarize(n, _):
      return int("".join(k+str(len(list(g))) for k, g in groupby(str(n))))
    def aupton(nn): return list(accumulate(repeat(2, nn), summarize))
    print(aupton(13)) # Michael S. Branicky, Feb 21 2021

A022499 Describe the previous term! (method B - initial term is 3).

Original entry on oeis.org

3, 31, 3111, 3113, 311231, 3112213111, 311222113113, 31122312311231, 3112223111213112213111, 31122331132111311222113113, 311222321231211331122312311231
Offset: 1

Views

Author

Keywords

Comments

Method B = 'digit'-indication followed by 'frequency'.

Examples

			E.g. the term after 3113 is obtained by saying "3 once, 1 twice, 3 once", which gives 311231.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 3;
    a[n_] := a[n] = {#[[1]], Length[#]}& /@ Split[a[n-1] // IntegerDigits] // Flatten // FromDigits;
    Array[a, 11] (* Jean-François Alcover, Jul 13 2016, updated Jan 05 2018 *)

A022500 Describe the previous term! (method B - initial term is 4).

Original entry on oeis.org

4, 41, 4111, 4113, 411231, 4112213111, 411222113113, 41122312311231, 4112223111213112213111, 41122331132111311222113113, 411222321231211331122312311231
Offset: 1

Views

Author

Keywords

Comments

Method B = 'digit'-indication followed by 'frequency'.

Examples

			E.g. the term after 4113 is obtained by saying "4 once, 1 twice, 3 once", which gives 411231.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 4;
    a[n_] := a[n] = {#[[1]], Length[#]}& /@ Split[a[n-1] // IntegerDigits] // Flatten // FromDigits;
    Array[a, 11] (* Jean-François Alcover, Jul 13 2016 *)

A022501 Describe the previous term! (method B - initial term is 5).

Original entry on oeis.org

5, 51, 5111, 5113, 511231, 5112213111, 511222113113, 51122312311231, 5112223111213112213111, 51122331132111311222113113, 511222321231211331122312311231
Offset: 1

Views

Author

Keywords

Comments

Method B = 'digit'-indication followed by 'frequency'.

Examples

			E.g. the term after 5113 is obtained by saying "5 once, 1 twice, 3 once", which gives 511231.
		

Crossrefs

Extensions

Typo in data correct by Peter J. C. Moses, Jun 14 2013

A022502 Describe the previous term! (method B - initial term is 6).

Original entry on oeis.org

6, 61, 6111, 6113, 611231, 6112213111, 611222113113, 61122312311231, 6112223111213112213111, 61122331132111311222113113, 611222321231211331122312311231
Offset: 1

Views

Author

Keywords

Comments

Method B = 'digit'-indication followed by 'frequency'.

Examples

			E.g. the term after 6113 is obtained by saying "6 once, 1 twice, 3 once", which gives 611231.
		

Crossrefs

A022503 Describe the previous term! (method B - initial term is 7).

Original entry on oeis.org

7, 71, 7111, 7113, 711231, 7112213111, 711222113113, 71122312311231, 7112223111213112213111, 71122331132111311222113113, 711222321231211331122312311231
Offset: 1

Views

Author

Keywords

Comments

Method B = 'digit'-indication followed by 'frequency'.

Examples

			E.g. the term after 7113 is obtained by saying "7 once, 1 twice, 3 once", which gives 711231.
		

Crossrefs

A022504 Describe the previous term! (method B - initial term is 8).

Original entry on oeis.org

8, 81, 8111, 8113, 811231, 8112213111, 811222113113, 81122312311231, 8112223111213112213111, 81122331132111311222113113, 811222321231211331122312311231
Offset: 1

Views

Author

Keywords

Comments

Method B = 'digit'-indication followed by 'frequency'.

Examples

			E.g. the term after 8113 is obtained by saying "8 once, 1 twice, 3 once", which gives 811231.
		

Crossrefs

A022471 Length of n-th term of A022470.

Original entry on oeis.org

1, 2, 4, 4, 6, 10, 12, 14, 22, 26, 30, 44, 56, 70, 98, 130, 162, 216, 292, 358, 470, 628, 792, 1050, 1384, 1788, 2334, 3072, 3974, 5162, 6784, 8786, 11420, 14992, 19484, 25388, 33160, 43262, 56252, 73392, 95798, 124496, 162556, 212048, 275976, 360154
Offset: 1

Views

Author

Keywords

Comments

a(n) is the length of the n-th term of many sequences generated by methods A and B, including those shown here:
Method A, 1st term ... Method B, 1st term
A006751, 2 ......... A022470, 2
A006715, 3 ......... A022499, 3
A001140, 4 ......... A022500, 4
A001141, 5 ......... A022501, 5
A001143, 6 ......... A022502, 6
A001145, 7 ......... A022503, 7
A001151, 8 ......... A022504, 8
A001154, 9 ......... A022505, 9
Clark Kimberling, Jun 14 2013

Crossrefs

Cf. A022470.

Programs

  • Mathematica
    a[0] = 2; a[n_] := a[n] = FromDigits[Flatten[{First[#], Length[#]} & /@   Split[IntegerDigits[a[n - 1]]]]]; Map[Length[IntegerDigits[a[#]]] &, Range[0, 40]] (* Peter J. C. Moses, Jun 14 2013 *)
    p = {9, -9, 6, -16, 5, 2, 0, -9, -1, -1, 20, 2, 6, -3, -15, -13, 15, 20, 15, -26, -28, 7, 6, 26, -27, -4, 9, -15, 3, 2, 8, 43, 9, -39, -24, -2, -24, 28, 9, 13, 13, -18, -12, -16, 14, 13, 16, 8, -36, 1, -6, -8, 15, 1, 14, 3, -6, -7, -3, 2, -2, 2, 2, 0, -1, -2, -1, 3, 3, -1, -1, -1}; q = {-6, 9, -9, 18, -16, 11, -14, 8, -1, 5, -7, -2, -8, 14, 5, 5, -19, -3, 6, 7, 6, -16, 7, -8, 22, -17, 12, -7, -5, -7, 8, -4, 7, 9, -13, 4, 6, -14, 14, -19, 7, 13, -2, 4, -18, 0, 1, 4, 12, -8, 5, 0, -8, -1, -7, 8, 5, 2, -3, -3, 0, 0, 0, 0, 2, 1, 0, -3, -1, 1, 1, 1, -1}; gf = Fold[x #1 + #2 &, 0, p]/Fold[x #1 + #2 &, 0, q]; CoefficientList[Series[gf, {x, 0, 100}], x] (* Peter J. C. Moses, Jun 16 2013 *)
Showing 1-9 of 9 results.