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
1, 1, 3, 2, 4, 9, 11, 11, 29, 53, 82, 129, 215, 389, 726, 1237, 2079, 3660, 6386, 11127, 19719, 34658, 60358, 105776, 185641, 324822, 569565, 999824, 1753763, 3075263, 5390839, 9452903, 16579307, 29065205, 50947822, 89330076, 156628094, 274559046, 481250343 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
These are integer compositions such that no adjacent parts are equal and their set of parts covers some interval.
LINKS
EXAMPLE
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).
PROG
(PARI)
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)}
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])}
B_x(20)
CROSSREFS
Sequence in context: A338246 A368225 A371267 * A084793 A033820 A095259
KEYWORD
nonn
AUTHOR
John Tyler Rascoe, Jul 17 2024
STATUS
approved

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 14:48 EDT 2024. Contains 375336 sequences. (Running on oeis4.)