%I #30 Dec 27 2023 16:31:27
%S 1,3,9,22,46,86,148,239,367,541,771,1068,1444,1912,2486,3181,4013,
%T 4999,6157,7506,9066,10858,12904,15227,17851,20801,24103,27784,31872,
%U 36396,41386,46873,52889,59467,66641,74446,82918,92094,102012,112711,124231
%N Number of unimodal functions [1..n]->[0..2].
%C Column 1 of A223725.
%H Alois P. Heinz, <a href="/A223718/b223718.txt">Table of n, a(n) for n = 0..10000</a> (terms n=1..210 from R. H. Hardin)
%H Kyu-Hwan Lee and Se-jin Oh, <a href="http://arxiv.org/abs/1601.06685">Catalan triangle numbers and binomial coefficients</a>, arXiv:1601.06685 [math.CO], 2016.
%F a(n) = A071920(n,3) = 1+n*(n+1)*(n^2+5*n+18)/24.
%F 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
%e Some solutions for n=3
%e ..1....2....0....1....0....2....1....2....0....2....0....1....0....1....0....1
%e ..2....1....1....1....0....0....0....1....0....2....2....1....1....2....2....2
%e ..0....1....0....0....1....0....0....0....2....2....1....1....1....2....0....1
%e From _Joerg Arndt_, Dec 27 2023: (Start)
%e The a(3) = 22 such functions are (dots for zeros)
%e 1: [ . . . ]
%e 2: [ . . 1 ]
%e 3: [ . . 2 ]
%e 4: [ . 1 . ]
%e 5: [ . 1 1 ]
%e 6: [ . 1 2 ]
%e 7: [ . 2 . ]
%e 8: [ . 2 1 ]
%e 9: [ . 2 2 ]
%e 10: [ 1 . . ]
%e 11: [ 1 1 . ]
%e 12: [ 1 1 1 ]
%e 13: [ 1 1 2 ]
%e 14: [ 1 2 . ]
%e 15: [ 1 2 1 ]
%e 16: [ 1 2 2 ]
%e 17: [ 2 . . ]
%e 18: [ 2 1 . ]
%e 19: [ 2 1 1 ]
%e 20: [ 2 2 . ]
%e 21: [ 2 2 1 ]
%e 22: [ 2 2 2 ]
%e (End)
%Y Column m=3 of A071920.
%Y Cf. A000124 (unimodal functions [1..n]->[0..1]), A088536 ([1..n] -> [1..n]).
%K nonn,easy
%O 0,2
%A _R. H. Hardin_, Mar 26 2013
%E a(0)=1 prepended by _Alois P. Heinz_, Dec 27 2023