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

A036103 A look-and-say sequence: each term summarizes the previous two terms.

Original entry on oeis.org

0, 1, 1110, 4110, 145120, 1524124120, 2534425120, 354413624120, 16355433523120, 26454463424120, 36456453523120, 46457443522120, 1736556443522120, 2736556433623120, 2756553463623120, 2766552473622120
Offset: 0

Views

Author

Keywords

Comments

A look-and-say sequence. a(3) says 4 ones, 1 zero, which is the count of ones and zeros in the two previous terms. a(4) says 1 four, 5 ones, 2 zeros.
From the 28th term the sequence gets into a cycle of 117.

Examples

			a(26) = 39283736554483723130;
a(27) = 39384726554493622120 = first term of first period;
a(28) = 39383736455493622120;
a(143) = 39283746553473823130 = last term of first period != a(26);
a(144) = 39384726554493622120 = first term of second period = a(27);
a(145) = 39383736455493622120 = a(28).
		

Crossrefs

Cf. A036059.
Cf. A036106.

Programs

  • Haskell
    import Data.List (sort, group); import Data.Function (on)
    a036103 n = a036103_list !! n
    a036103_list = 0 : 1 : map (read . concatMap say . group . reverse . sort)
                   (zipWith ((++) `on` show) a036103_list $ tail a036103_list)
                   where say w = (show $ length w) ++ [head w]
    -- Reinhard Zumkeller, Oct 05 2015
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = Reverse /@ (Join[a[n-2] // IntegerDigits, a[n-1] // IntegerDigits] // Tally // SortBy[#, First]& // Reverse) // Flatten // FromDigits;
    Array[a, 16, 0] (* Jean-François Alcover, Jul 13 2016 *)
Showing 1-1 of 1 results.