%I #10 Nov 07 2014 03:44:21
%S 1,1,3,7,16,30,70,144,299,615,1261,2584,5238,10624,21482,43350,87331,
%T 175703,353074,708963,1422445,2852299,5716668,11453033,22938117,
%U 45928418,91941762,184021452,368267172,736898601,1474388631,2949737232,5901032198,11804591355
%N Number of compositions of n having exactly four fixed points.
%H Joerg Arndt and Alois P. Heinz, <a href="/A240739/b240739.txt">Table of n, a(n) for n = 10..1000</a>
%F a(n) ~ c * 2^n, where c = 0.00134325422292269761312514583911029332451787453007326095828843859220629510... . - _Vaclav Kotesovec_, Sep 07 2014
%e a(12) = 3: 12315, 12342, 123411.
%e a(13) = 7: 12145, 12325, 12343, 123151, 123412, 123421, 1234111.
%e a(14) = 16: 11345, 12245, 12335, 12344, 121451, 123116, 123152, 123251, 123413, 123422, 123431, 1231511, 1234112, 1234121, 1234211, 12341111.
%p b:= proc(n, i) option remember; `if`(n=0, 1, series(
%p add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n), x, 5))
%p end:
%p a:= n-> coeff(b(n, 1), x, 4):
%p seq(a(n), n=10..50);
%t b[n_, i_] := b[n, i] = If[n == 0, 1, Series[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}], {x, 0, 5}]]; a[n_] := SeriesCoefficient[b[n, 1], {x, 0, 4}]; Table[a[n], {n, 10, 50}] (* _Jean-François Alcover_, Nov 07 2014, after Maple *)
%Y Column k=4 of A238349 and of A238350.
%K nonn
%O 10,3
%A _Joerg Arndt_ and _Alois P. Heinz_, Apr 11 2014