login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A106358 Number of compositions of n with exactly 2 adjacent equal parts (2 pairs or 1 triple.). 1

%I #13 Nov 18 2020 06:51:17

%S 1,0,2,8,10,22,58,112,219,466,920,1787,3600,7025,13532,26315,50625,

%T 96775,185000,351714,665942,1258649,2371219,4454004,8348735,15612146,

%U 29128863,54245790,100828939,187074952,346527510,640878692,1183480187

%N Number of compositions of n with exactly 2 adjacent equal parts (2 pairs or 1 triple.).

%H Alois P. Heinz, <a href="/A106358/b106358.txt">Table of n, a(n) for n = 3..1000</a>

%H A. Knopfmacher and H. Prodinger, <a href="https://doi.org/10.1006/eujc.1998.0216">On Carlitz compositions</a>, European Journal of Combinatorics, Vol. 19, 1998, pp. 579-589.

%F a(n) ~ c * d^n * n^2, where d = 1.7502412917183090312497386246... (see A241902), c = 0.0025523594118210599072896951... . - _Vaclav Kotesovec_, Aug 25 2014

%p b:= proc(n, v) option remember; `if`(n=0, [1, 0$2], add((

%p p->`if`(i=v, [0, p[1..2][]], p))(b(n-i, i)), i=1..n))

%p end:

%p a:= n-> b(n, 0)[3]:

%p seq(a(n), n=3..45); # _Alois P. Heinz_, Jun 24 2014

%t b[n_, v_] := b[n, v] = If[n==0, {1, 0, 0}, Sum[If[i==v, Prepend[#[[1;;2]], 0], #]&[b[n-i, i]], {i, 1, n}]];

%t a[n_] := b[n, 0][[3]];

%t a /@ Range[3, 45] (* _Jean-François Alcover_, Nov 18 2020, after _Alois P. Heinz_ *)

%Y Column 2 of A106356. Cf. A003242.

%Y Cf. A241902.

%K nonn

%O 3,3

%A _Christian G. Bower_, Apr 29 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)