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 10 results.

A022488 Describe previous term from the right (method B - initial term is 2).

Original entry on oeis.org

2, 21, 1121, 112112, 21122112, 2112221221, 112211231221, 1122113121122212, 21112312211131122212, 211123123113221131211321, 112131122111311222311231211131211321, 112131122111311321113121123123123113221231112112
Offset: 1

Views

Author

Keywords

Comments

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

Examples

			E.g., the term after 1121 is obtained by saying "1 once, 2 once, 1 twice", which gives 112112.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, transpose)
    a022488 n = a022488_list !! (n-1)
    a022488_list = 2 : f [2] :: [Integer] where
       f xs = (read $ concatMap show ys) : f ys where
              ys = concat $ transpose [map head zss, map length zss]
              zss = reverse $ group xs
    -- Reinhard Zumkeller, Apr 14 2014
    
  • Mathematica
    A022488[1]:=2;A022488[n_]:=A022488[n]=FromDigits[Flatten[{First[#],Length[#]}&/@Split[Reverse[IntegerDigits[A022488[n-1]]]]]];Map[A022488,Range[15]] (* Peter J. C. Moses, Apr 22 2013 *)
  • Python
    from re import split
    A022488_list, l = [2], '2'
    for _ in range(10):
        l = ''.join(d[0]+str(len(d)) for d in split('(0+|1+|2+|3+|4+|5+|6+|7+|8+|9+)',l[::-1]) if d != '')
        A022488_list.append(int(l)) # Chai Wah Wu, Jan 07 2015
    
  • 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)[::-1])))
    def aupton(nn): return list(accumulate(repeat(2, nn), summarize))
    print(aupton(12)) # Michael S. Branicky, Feb 21 2021

A022514 Describe previous term from the right (method B - initial term is 3).

Original entry on oeis.org

3, 31, 1131, 113112, 21123112, 211231211221, 112212211131211221, 1122122111311322112212, 21112212223112311322112212, 21112212223112312112312311221321
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			The term after 1131 is obtained by saying "1 once, 3 once, 1 twice", which gives 113112.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, transpose)
    a022514 n = a022514_list !! n
    a022514_list = 3 : f [3] :: [Integer] where
       f xs = (read $ concatMap show ys) : f ys where
              ys = concat $ transpose [map head zss, map length zss]
              zss = reverse $ group xs
    -- Reinhard Zumkeller, Jan 26 2014
  • Mathematica
    A022514[1]:=3;A022514[n_]:=A022514[n]=FromDigits[Flatten[{First[#],Length[#]}&/@Split[Reverse[IntegerDigits[A022514[n-1]]]]]];Map[A022514,Range[15]] (* Peter J. C. Moses, Apr 22 2013 *)

Extensions

More terms from Patrick De Geest, Jun 15 1999

A022520 Describe previous term from the right (method B - initial term is 9).

Original entry on oeis.org

9, 91, 1191, 119112, 21129112, 211291211221, 112212211191211221, 1122122111911322112212, 21112212223112911322112212, 21112212223112912112312311221321
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			The term after 1191 is obtained by saying "1 once, 9 once, 1 twice", which gives 119112.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, transpose)
    a022520 n = a022520_list !! n
    a022520_list = 9 : f [9] :: [Integer] where
       f xs = (read $ concatMap show ys) : f ys where
              ys = concat $ transpose [map head zss, map length zss]
              zss = reverse $ group xs
    -- Reinhard Zumkeller, Jan 26 2014

Extensions

More terms from Patrick De Geest, Jun 15 1999

A023989 Look and Say sequence: describe the previous term! (method C - initial term is 2).

Original entry on oeis.org

2, 12, 1112, 3112, 211213, 312213, 212223, 114213, 31121314, 41122314, 31221324, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314
Offset: 0

Views

Author

Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), Mar 19 2002

Keywords

Comments

Method C = 'frequency' followed by 'digit'-indication with digits in increasing order.
Converges to 21322314 at the eleventh term.
Depending on the initial value, the sequence may converge to a cycle of 2 or more values, for example: 123456, 111213141516, 711213141516, 61121314151617, 71121314152617, 61221314151627, 51321314152617, 51222314251617, 41421314251617, 51221334151617, 51222314251617, 41421314251617, 51221334151617. [Corrected by Pontus von Brömssen, Jun 04 2023]
a(n) = A005151(n) for n > 6. - Reinhard Zumkeller, Jan 26 2014

Examples

			a(1) = 12, so a(2) = 1112 because 12 contains a digit 1 and a digit 2; a(3) = 3112 because 1112 contains three digits 1 and a digit 2
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, sort, transpose)
    a023989 n = a023989_list !! (n-1)
    a023989_list = 2 : f [2] :: [Integer] where
       f xs = (read $ concatMap show ys) : f (ys) where
              ys = concat $ transpose [map length zss, map head zss]
              zss = group $ sort xs
    -- Reinhard Zumkeller, Jan 26 2014

Formula

a(n) = A047842(a(n-1)). - Pontus von Brömssen, Jun 04 2023

A022515 Describe previous term from the right (method B - initial term is 4).

Original entry on oeis.org

4, 41, 1141, 114112, 21124112, 211241211221, 112212211141211221, 1122122111411322112212, 21112212223112411322112212, 21112212223112412112312311221321
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			The term after 1141 is obtained by saying "1 once, 4 once, 1 twice", which gives 114112.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, transpose)
    a022515 n = a022515_list !! n
    a022515_list = 4 : f [4] :: [Integer] where
       f xs = (read $ concatMap show ys) : f ys where
              ys = concat $ transpose [map head zss, map length zss]
              zss = reverse $ group xs
    -- Reinhard Zumkeller, Jan 26 2014
  • Mathematica
    A022515[1]:=4;A022515[n_]:=A022515[n]=FromDigits[Flatten[{First[#],Length[#]}&/@Split[Reverse[IntegerDigits[A022515[n-1]]]]]];Map[A022515,Range[15]] (* Peter J. C. Moses, Apr 22 2013 *)

Extensions

More terms from Patrick De Geest, Jun 15 1999

A022519 Describe previous term from the right (method B - initial term is 8).

Original entry on oeis.org

8, 81, 1181, 118112, 21128112, 211281211221, 112212211181211221, 1122122111811322112212, 21112212223112811322112212, 21112212223112812112312311221321
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			The term after 1181 is obtained by saying "1 once, 8 once, 1 twice", which gives 118112.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, transpose)
    a022519 n = a022519_list !! n
    a022519_list = 8 : f [8] :: [Integer] where
       f xs = (read $ concatMap show ys) : f ys where
              ys = concat $ transpose [map head zss, map length zss]
              zss = reverse $ group xs
    -- Reinhard Zumkeller, Jan 26 2014
    
  • Python
    from itertools import groupby
    A022519_list = [8]
    for _ in range(10):
        A022519_list.append(int(''.join(str(k)+str(len(list(g))) for k, g in groupby(str(A022519_list[-1])[::-1])))) # Chai Wah Wu, Sep 01 2021

Extensions

More terms from Patrick De Geest, Jun 15 1999

A022516 Describe previous term from the right (method B - initial term is 5).

Original entry on oeis.org

5, 51, 1151, 115112, 21125112, 211251211221, 112212211151211221, 1122122111511322112212, 21112212223112511322112212, 21112212223112512112312311221321
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			The term after 1151 is obtained by saying "1 once, 5 once, 1 twice", which gives 115112.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, transpose)
    a022516 n = a022516_list !! n
    a022516_list = 5 : f [5] :: [Integer] where
       f xs = (read $ concatMap show ys) : f ys where
              ys = concat $ transpose [map head zss, map length zss]
              zss = reverse $ group xs
    -- Reinhard Zumkeller, Jan 26 2014

Extensions

More terms from Patrick De Geest, Jun 15 1999

A022517 Describe previous term from the right (method B - initial term is 6).

Original entry on oeis.org

6, 61, 1161, 116112, 21126112, 211261211221, 112212211161211221, 1122122111611322112212, 21112212223112611322112212, 21112212223112612112312311221321
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			The term after 1161 is obtained by saying "1 once, 6 once, 1 twice", which gives 116112.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, transpose)
    a022517 n = a022517_list !! n
    a022517_list = 6 : f [6] :: [Integer] where
       f xs = (read $ concatMap show ys) : f ys where
              ys = concat $ transpose [map head zss, map length zss]
              zss = reverse $ group xs
    -- Reinhard Zumkeller, Jan 26 2014

Extensions

More terms from Patrick De Geest, Jun 15 1999

A022518 Describe previous term from the right (method B - initial term is 7).

Original entry on oeis.org

7, 71, 1171, 117112, 21127112, 211271211221, 112212211171211221, 1122122111711322112212, 21112212223112711322112212, 21112212223112712112312311221321
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			The term after 1171 is obtained by saying "1 once, 7 once, 1 twice", which gives 117112.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, transpose)
    a022518 n = a022518_list !! n
    a022518_list = 7 : f [7] :: [Integer] where
       f xs = (read $ concatMap show ys) : f ys where
              ys = concat $ transpose [map head zss, map length zss]
              zss = reverse $ group xs
    -- Reinhard Zumkeller, Jan 26 2014
  • Mathematica
    split[n_]:=Split[Reverse[IntegerDigits[n]]];
    list1[n_]:=List/@Length/@split[n];riffle1[n_]:=Riffle[split[n],list1[n]];
    tab[n_]:=Table[i,{i,1,2*Length[list1[n]],2}];
    list2[n_]:=Append[riffle1[n][[#]],riffle1[n][[#+1]]]&/@tab[n];
    flat[n_]:=Flatten/@list2[n];riffle2[n_]:=Riffle[First/@flat[n],Last/@flat[n]];
    a[1]=7;a[n_]:=FromDigits[riffle2[a[n-1]]];Array[a,10] (* or *)
    a[1]=7;a[n_]:=FromDigits[Flatten[Replace[Replace[Replace[Split[Reverse[IntegerDigits[
    a[n-1]]]],{x_,y_}-> {x,Length[{x,y}]},{1}],{x_,y_,z_}-> {x,Length[{x,y,z}]},{1}],{x_}-> {x,Length[{x}]},{1}]]];Array[a,10] (* Ivan N. Ianakiev, Oct 07 2016 *)

Extensions

More terms from Erich Friedman
Corrected from 8th term by Patrick De Geest, Jun 15 1999

A127178 Primes whose "Look And Say" descriptions from right to left (in the sense of method B, i.e., digit-indication followed by frequency) are also primes.

Original entry on oeis.org

3, 7, 23, 59, 71, 83, 89, 103, 131, 233, 269, 311, 317, 349, 389, 409, 461, 479, 499, 547, 601, 619, 631, 641, 643, 683, 709, 719, 727, 733, 757, 787, 821, 853, 859, 911, 937, 971, 983, 1069, 1093, 1223, 1229, 1231, 1291, 1297, 1327, 1381, 1471, 1489, 1531
Offset: 1

Views

Author

Lekraj Beedassy, Jan 07 2007

Keywords

Examples

			71, 499 and 1223, for instance, belong to the sequence because their respective descriptions 1171 (1 once, 7 once), 9241 (9 twice, 4 once), 312211 (3 once, 2 twice, 1 once) are all primes.
		

Crossrefs

Programs

  • Mathematica
    LookAndSayB[ n_] := FromDigits@Flatten@((Through[ {First, Length}[ # ] ] &) /@ Split@Reverse@IntegerDigits@n); Select[Prime@Range[400],PrimeQ@LookAndSayB@# &] (* Ray Chandler, Jan 16 2007 *)

Extensions

Corrected by Ray Chandler, Jan 16 2007
Showing 1-10 of 10 results.