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!)
A114902 Number of compositions of {1,..,n} such that no two adjacent parts are of equal size (labeled Carlitz compositions). 5

%I #12 Sep 21 2019 02:39:12

%S 1,1,1,7,21,81,793,4929,33029,388537,3751311,37585989,523395777,

%T 6814401361,90789460427,1486639926417,24213653736389,403184436319401,

%U 7665459211898263,149067938821523349,2971265450045056871,64800464138121854877,1460876941168812354947

%N Number of compositions of {1,..,n} such that no two adjacent parts are of equal size (labeled Carlitz compositions).

%H Alois P. Heinz, <a href="/A114902/b114902.txt">Table of n, a(n) for n = 0..450</a>

%F a(n) ~ c * d^n * n^(n + 1/2), where d = 0.37565358657373546999489873158654700..., c = 2.0427954030382239202983023897265... - _Vaclav Kotesovec_, Sep 21 2019

%p b:= proc(n, i) option remember;

%p `if`(n=0, 1, add(`if`(i=j, 0, b(n-j,

%p `if`(j>n-j, 0, j)) *binomial(n, j)), j=1..n))

%p end:

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

%p seq(a(n), n=0..25); # _Alois P. Heinz_, Sep 04 2015

%t b[n_, i_] := b[n, i] = If[n==0, 1, Sum[If[i==j, 0, b[n-j, If[j>n-j, 0, j]]* Binomial[n, j]], {j, 1, n}]]; a[n_] := b[n, 0]; Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Feb 20 2017, after _Alois P. Heinz_ *)

%Y Cf. A000670, A003242, A007837, A032011.

%Y Column k=1 of A261959.

%K nonn

%O 0,4

%A _Christian G. Bower_, Jan 05 2006

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.)