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

A005151 Summarize the previous term (digits in increasing order), starting with a(1) = 1.

Original entry on oeis.org

1, 11, 21, 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
Offset: 1

Views

Author

Keywords

Comments

a(n) = 21322314 for n > 12. - Reinhard Zumkeller, Jan 25 2014
The digits of each term a(n) are a permutation of those of the corresponding term A063850(n). - Chayim Lowen, Jul 16 2015

Examples

			The term after 312213 is obtained by saying "Two 1's, two 2's, two 3's", which gives 21-22-23, i.e., 212223.
		

References

  • C. Fleenor, "A litteral sequence", Solution to Problem 2562, Journal of Recreational Mathematics, vol. 31 No. 4 pp. 307 2002-3 Baywood NY.
  • Problem in J. Recreational Math., 30 (4) (1999-2000), p. 309.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005150, A047842. See A083671 for another version.

Programs

  • Haskell
    import Data.List (group, sort, transpose)
    a005151 n = a005151_list !! (n-1)
    a005151_list = 1 : f [1] :: [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 25 2014
    
  • Mathematica
    RunLengthEncode[x_List] := (Through[{Length, First}[ #1]] &) /@ Split[ Sort[x]]; LookAndSay[n_, d_:1] := NestList[ Flatten[ RunLengthEncode[ # ]] &, {d}, n - 1]; F[n_] := LookAndSay[n, 1][[n]]; Table[ FromDigits[ F[n]], {n, 25}] (* Robert G. Wilson v, Jan 22 2004 *)
    a[1] = 1; a[n_] := a[n] = FromDigits[Reverse /@ Sort[Tally[a[n-1] // IntegerDigits], #1[[1]] < #2[[1]]&] // Flatten]; Array[a, 26] (* Jean-François Alcover, Jan 25 2016 *)
  • PARI
    say(n) = {digs = digits(n); d = vecsort(digs,,8); s = ""; for (k=1, #d, nbk = #select(x->x==d[k], digs); s = concat(s, Str(nbk)); s = concat(s, d[k]);); eval(s);}
    lista(nn) = {print1(n = 1, ", "); for (k=1, nn, m = say(n); print1(m, ", "); n = m;);} \\ Michel Marcus, Feb 12 2016
    
  • PARI
    a(n,show_all=1,a=1)={for(i=2,n,show_all&&print1(a",");a=A047842(a));a} \\ M. F. Hasler, Feb 25 2018
    
  • PARI
    Vec(x*(1 + 10*x + 10*x^2 + 1091*x^3 + 2000*x^4 + 208101*x^5 + 101000*x^6 - 99990*x^7 - 98010*x^8 + 31007101*x^9 + 10001000*x^10 - 9900990*x^11 - 9899010*x^12) / (1 - x) + O(x^40)) \\ Colin Barker, Aug 23 2018
    
  • Python
    from itertools import accumulate, groupby, repeat
    def summarize(n, _):
      return int("".join(str(len(list(g)))+k for k, g in groupby(sorted(str(n)))))
    def aupton(nn): return list(accumulate(repeat(1, nn+1), summarize))
    print(aupton(25)) # Michael S. Branicky, Jan 11 2021

Formula

a(n+1) = A047842(a(n)). - M. F. Hasler, Feb 25 2018
G.f.: x*(1 + 10*x + 10*x^2 + 1091*x^3 + 2000*x^4 + 208101*x^5 + 101000*x^6 - 99990*x^7 - 98010*x^8 + 31007101*x^9 + 10001000*x^10 - 9900990*x^11 - 9899010*x^12) / (1 - x). - Colin Barker, Aug 23 2018

A118628 "Say what you see".

Original entry on oeis.org

3, 13, 1113, 3113, 2123, 112213, 312213, 212223, 114213, 31121314, 41122314, 31221324, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314
Offset: 1

Views

Author

Parthasarathy Nambi, May 09 2006

Keywords

Examples

			3 = "one three" --> 13
13 = "one one, one three" --> 1113
1113 = "three ones, one three" --> 3113
3113 = "two ones, two threes" --> 2123
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, sort, transpose)
    a118628 n = a118628_list !! (n-1)
    a118628_list = 3 : f [3] :: [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) = 21322314 for n > 12; a(n) = A005151(n) for n > 6. - Reinhard Zumkeller, Jan 26 2014
a(n) = A047842(a(n-1)). - Pontus von Brömssen, Jun 04 2023

A121993 Numbers k that yield a smaller number a(k) under the "Look and Say" function A045918.

Original entry on oeis.org

33, 44, 55, 66, 77, 88, 99, 111, 222, 333, 444, 555, 666, 777, 888, 999, 1111, 1222, 1333, 1444, 1555, 1666, 1777, 1888, 1999, 2000, 2111, 2222, 2233, 2244, 2255, 2266, 2277, 2288, 2299, 2333, 2444, 2555, 2666, 2777, 2888, 2999, 3000, 3111, 3222, 3300, 3311
Offset: 1

Views

Author

Sergio Pimentel, Sep 11 2006

Keywords

Examples

			a(26)=2000 because under the Look and Say operator, 2000 is described as one two three zeros or: 1230, which is smaller than 2000.
		

Crossrefs

Programs

  • Haskell
    a121993 n = a121993_list !! (n-1)
    a121993_list = filter (\x -> a045918 x < x) [0..]
    -- Reinhard Zumkeller, Jan 25 2014
    
  • Python
    from itertools import groupby
    def ok(n): return n > int(''.join(str(len(list(g)))+k for k, g in groupby(str(n))))
    print([k for k in range(3312) if ok(k)]) # Michael S. Branicky, May 26 2023

A037192 Summarize the previous term!, starting with 8899.

Original entry on oeis.org

8899, 2829, 221819, 21221819, 31321819, 3112231819, 4122231819, 313213141819, 511233141819, 51122314151819, 61221314251819, 5132131415161819, 7112231425161819, 613213141516171819, 811223141526171819
Offset: 0

Views

Author

Dave Ellis (djellis(AT)hotmail.com)

Keywords

Crossrefs

Extensions

More terms from Erich Friedman.

A121994 Smallest natural number that yields a sequence of n decreasing numbers under the "Look and Say" operator A045918.

Original entry on oeis.org

1, 33, 333, 333111, 33333333333333333333333333333333311111111111
Offset: 0

Views

Author

Sergio Pimentel, Sep 11 2006

Keywords

Comments

a(5) <= 33333333333333333333333333333333 '3's concatenated with 1111111111 '1's. - Tyler Busby, Feb 07 2023

Examples

			a(3)=333111 because under the Look and Say operator sequence A045918 it yields: 3331, 3311, 2321 which are all decreasing (3 in a row). The next term would be 12131211 which is greater than 2321.
		

Crossrefs

Extensions

a(4) from Sergio Pimentel, Mar 05 2008
a(4) corrected by Tyler Busby, Feb 07 2023
Showing 1-5 of 5 results.