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!)
A374726 Number of gap-free Carlitz compositions of n. 2

%I #11 Jul 19 2024 14:35:29

%S 1,1,3,2,4,9,11,11,29,53,82,129,215,389,726,1237,2079,3660,6386,11127,

%T 19719,34658,60358,105776,185641,324822,569565,999824,1753763,3075263,

%U 5390839,9452903,16579307,29065205,50947822,89330076,156628094,274559046,481250343

%N Number of gap-free Carlitz compositions of n.

%C These are integer compositions such that no adjacent parts are equal and their set of parts covers some interval.

%e a(6) = 9 counts: (1,2,1,2), (2,1,2,1), (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1), (6).

%o (PARI)

%o Ca_x(s, N)={my(x='x+O('x^N), g=if(#s <1, 1, sum(i=1, #s, (Ca_x(s[^i], N) * x^(s[i])/(1+x^(s[i]))))/(1-sum(i=1, #s, (x^(s[i]))/(1+x^(s[i])))))); return(g)}

%o B_x(N)={my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, for(k=0,N, h += Ca_x([(1+k)..(j+k)], N+1)); j++); my(a = Vec(h)); vector(N, i, a[i])}

%o B_x(20)

%Y Cf. A003242, A011782, A107428, A107429, A374147, A374727, A374728.

%K nonn

%O 1,3

%A _John Tyler Rascoe_, Jul 17 2024

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 August 20 17:12 EDT 2024. Contains 375337 sequences. (Running on oeis4.)