|
|
A223718
|
|
Number of unimodal functions [1..n]->[0..2].
|
|
23
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n) = A071920(n,3) = 1+n*(n+1)*(n^2+5*n+18)/24.
|
|
EXAMPLE
|
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
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
|
Cf. A000124 (unimodal functions [1..n]->[0..1]), A088536 ([1..n] -> [1..n]).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|