cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A374728 Number of n-color gap-free compositions of n.

This page as a plain text file.
%I A374728 #12 Jul 19 2024 14:36:40
%S A374728 1,1,1,3,7,19,45,105,239,507,1079,2303,4829,10425,23263,53363,127995,
%T A374728 318983,816057,2133241,5640135,14975051,39772751,105322879,277547989,
%U A374728 727276225,1894282195,4903985955,12621154315,32302574959,82248961437,208426306113,525884062427
%N A374728 Number of n-color gap-free compositions of n.
%C A374728 These are integer compositions whose set of parts covers some interval and contains k colors of each part k.
%e A374728 a(5) = 7 counts: (1,1,1,1,1), (1,2_a,2_b), (1,2_b,2_a), (2_a,1,2_b), (2_a,2_b,1), (2_b,1,2_a), (2_b,2_a,1).
%o A374728 (PARI)
%o A374728 colr(x,y)={my(r=y-x+1, v=[x..y], z = vector(r*(r+(1+(x-1)*2))/2), k=1); for(i=1,#v,for(j=1,v[i],z[k]=v[i]; k++)); return(z)}
%o A374728 C_x(s,N)={my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, C_x(s[^i],N+1) * x^(s[i]) )/(1-sum(i=1,#s, x^(s[i]))))); return(g)}
%o A374728 B_x(N)={my(x='x+O('x^N), h=0); for(u=1,N, my(j=0); while(vecsum(colr(u,u+j)) <= N, h += C_x(colr(u,u+j),N+1); j++)); my(a = Vec(h)); vector(N, i, a[i])}
%o A374728 B_x(20)
%Y A374728 Cf. A003242, A011782, A107428, A107429, A374147, A374726, A374727.
%K A374728 nonn
%O A374728 1,4
%A A374728 _John Tyler Rascoe_, Jul 17 2024