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

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 *)

A022472 Number of 1's in n-th term of A022470.

Original entry on oeis.org

0, 1, 3, 2, 3, 6, 6, 6, 12, 13, 12, 23, 29, 33, 50, 69, 76, 108, 150, 172, 226, 323, 385, 518, 698, 884, 1146, 1539, 1961, 2537, 3378, 4341, 5628, 7455, 9662, 12530, 16453, 21436, 27807, 36306, 47519, 61496, 80491, 105100, 136535, 178254, 232820, 302713
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    p={2,5,-6,1,-6,-5,19,-10,0,-13,3,13,13,-12,0,-11,2,-1,17,12,-8,-12,-21,6,23,-13,-9,19,-17,16,-17,-6,24,35,-30,-14,2,-33,21,18,-12,16,-12,-3,5,-2,-3,13,10,-21,-1,-8,-3,15,1,1,2,-4,-1,0,1,-3,3,1,-2,-2,-1,1,3,2,-2,-1,0}; 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,99}], x] (* Peter J. C. Moses, Jun 23 2013 *)

A022473 Number of 2's in n-th term of A022470.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 5, 7, 7, 11, 14, 16, 22, 34, 37, 56, 70, 94, 113, 161, 191, 252, 341, 435, 568, 762, 973, 1276, 1661, 2169, 2817, 3657, 4811, 6200, 8178, 10603, 13878, 18015, 23582, 30617, 39919, 52100, 67898, 88298, 115624, 150200, 196145, 255716, 333151
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    p={-6,11,-10,17,-19,14,-23,16,-14,17,-14,19,-21,29,-11,2,-19,18,-2,7,-19,-18,37,-16,18,-19,11,-10,-1,-25,27,12,25,-22,-6,-22,6,-9,15,-12,33,-3,-11,-3,-28,24,16,-7,7,-19,8,4,-16,0,-2,18,1,1,-7,-2,1,-2,-2,3,3,1,-2,-3,0,2,1,0,-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,99}],x] (* Peter J. C. Moses, Jun 23 2013 *)

A022474 Number of 3's in n-th term of A022470.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 3, 3, 6, 7, 7, 11, 15, 14, 24, 30, 38, 48, 73, 83, 114, 155, 191, 251, 336, 426, 560, 737, 964, 1237, 1628, 2135, 2726, 3622, 4680, 6104, 7948, 10430, 13504, 17662, 23081, 29965, 39050, 51143, 66276, 86674, 112986, 147161, 191843, 250259
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    p={4,-7,7,-12,9,-4,6,-6,5,-5,10,-12,10,-11,8,-6,4,-2,5,-4,1,2,-9,16,-15,5,-6,0,3,12,-8,2,-6,-4,-3,12,-10,18,-8,3,-8,0,5,-6,7,-8,0,10,-9,4,-6,-2,11,0,2,-5,0,-3,1,-1,0,3,1,-2,-1,0,1,1,0,-1,0,0,0}; 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,99}],x] (* Peter J. C. Moses, Jun 23 2013 *)

A022475 Sum of digits in n-th term of A022470.

Original entry on oeis.org

2, 3, 5, 7, 10, 15, 20, 25, 35, 45, 55, 72, 94, 122, 160, 215, 278, 362, 482, 617, 797, 1047, 1354, 1773, 2321, 3028, 3948, 5165, 6724, 8751, 11427, 14859, 19347, 25255, 32928, 42926, 55971, 73036, 95127, 123982, 161739, 210577, 274586, 358046, 466560, 608330
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    p={2,6,-5,-1,-17,11,-9,4,-13,6,5,15,1,13,2,-25,-24,29,28,14,-43,-42,26,22,14,-36,-5,-1,-10,2,13,24,56,-21,-51,-22,-16,3,27,3,30,10,-19,-27,-30,22,29,29,-3,-47,-3,-6,-2,15,3,22,4,-11,-12,-7,3,2,2,1,1,0,-2,-2,3,3,0,-1,-2}; 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,99}],x] (* Peter J. C. Moses, Jun 23 2013 *)

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

A055168 Cumulative counting sequence: method B (noun,adjective)-pairs with first term 0.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 1, 0, 3, 1, 3, 2, 1, 0, 4, 1, 5, 2, 2, 3, 2, 0, 5, 1, 6, 2, 5, 3, 3, 4, 1, 5, 1, 0, 6, 1, 9, 2, 6, 3, 5, 4, 2, 5, 4, 6, 1, 0, 7, 1, 11, 2, 8, 3, 6, 4, 4, 5, 6, 6, 4, 9, 1, 0, 8, 1, 13, 2, 9, 3, 7, 4, 7, 5, 7, 6, 7, 9, 2, 7, 1, 11, 1, 8, 1, 0, 9, 1, 17
Offset: 1

Views

Author

Clark Kimberling, Apr 27 2000

Keywords

Comments

Write 0 followed by segments defined inductively as follows: each segment tells how many times each previously written integer occurs, stating first the integer being counted and then its frequency. This is Method B (noun-before-adjective); for Method A (adjective-before-noun), see A217760. - Clark Kimberling, Mar 25 2013

Examples

			Start with 0, then 0,1; then 2,0 and 1,1; etc.
Writing pairs vertically, the initial segments are
0..0..0 1..0 1 2..0 1 2 3..0 1 2 3 4 5..0 1 2 3 4 5 6..0  1 2 3 4 5 6 9
...1..2 1..3 3 1..4 5 2 2..5 6 5 3 1 1..6 9 6 5 2 4 1..7 11 8 6 4 6 3 1
The 5th segment tells that 0 has been written 4 times, 1 5 times, 2 2 times, and 3 2 times. The nouns are 1 2 3; the adjectives, 5 2 2.  - _Clark Kimberling_, Mar 25 2013
		

Crossrefs

See A001155 and A022470 for well-known counting sequences using methods A and B.

Programs

  • Mathematica
    s = {0}; Do[s = Flatten[{s, {#,Count[s, #]} & /@ DeleteDuplicates[s]}], {24}]; s (* Peter J. C. Moses, Mar 21 2013 *)

Extensions

Conjecture removed by Clark Kimberling, Oct 24 2009

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 *)

A022505 Describe the previous term! (method B - initial term is 9).

Original entry on oeis.org

9, 91, 9111, 9113, 911231, 9112213111, 911222113113, 91122312311231, 9112223111213112213111, 91122331132111311222113113, 911222321231211331122312311231
Offset: 1

Views

Author

Keywords

Comments

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

Examples

			E.g., the term after 9113 is obtained by saying "9 once, 1 twice, 3 once", which gives 911231.
		

Crossrefs

Extensions

a(12)-(14) needlessly added by Alvin Hoover Belt, Jan 31 2010
Showing 1-10 of 14 results. Next