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.

A223718 Number of unimodal functions [1..n]->[0..2].

Original entry on oeis.org

1, 3, 9, 22, 46, 86, 148, 239, 367, 541, 771, 1068, 1444, 1912, 2486, 3181, 4013, 4999, 6157, 7506, 9066, 10858, 12904, 15227, 17851, 20801, 24103, 27784, 31872, 36396, 41386, 46873, 52889, 59467, 66641, 74446, 82918, 92094, 102012, 112711, 124231
Offset: 0

Views

Author

R. H. Hardin, Mar 26 2013

Keywords

Comments

Column 1 of A223725.

Examples

			Some solutions for n=3
..1....2....0....1....0....2....1....2....0....2....0....1....0....1....0....1
..2....1....1....1....0....0....0....1....0....2....2....1....1....2....2....2
..0....1....0....0....1....0....0....0....2....2....1....1....1....2....0....1
From _Joerg Arndt_, Dec 27 2023: (Start)
The a(3) = 22 such functions are (dots for zeros)
   1:  [ . . . ]
   2:  [ . . 1 ]
   3:  [ . . 2 ]
   4:  [ . 1 . ]
   5:  [ . 1 1 ]
   6:  [ . 1 2 ]
   7:  [ . 2 . ]
   8:  [ . 2 1 ]
   9:  [ . 2 2 ]
  10:  [ 1 . . ]
  11:  [ 1 1 . ]
  12:  [ 1 1 1 ]
  13:  [ 1 1 2 ]
  14:  [ 1 2 . ]
  15:  [ 1 2 1 ]
  16:  [ 1 2 2 ]
  17:  [ 2 . . ]
  18:  [ 2 1 . ]
  19:  [ 2 1 1 ]
  20:  [ 2 2 . ]
  21:  [ 2 2 1 ]
  22:  [ 2 2 2 ]
(End)
		

Crossrefs

Column m=3 of A071920.
Cf. A000124 (unimodal functions [1..n]->[0..1]), A088536 ([1..n] -> [1..n]).

Formula

a(n) = A071920(n,3) = 1+n*(n+1)*(n^2+5*n+18)/24.
G.f.: 1-x*(x^2-3*x+3)*(x^2-x+1) / (x-1)^5 . a(n) = 1+A051744(n). - R. J. Mathar, May 17 2014

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 27 2023