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.

A382992 Number of compositions of n that have at least 1 part equal to 1 and any part 1 at position k can be k different colors.

This page as a plain text file.
%I A382992 #22 Apr 24 2025 07:59:22
%S A382992 0,1,2,9,38,190,1105,7465,57808,505924,4940320,53248819,627848796,
%T A382992 8037734786,111017325240,1645384681388,26044845197271,438499277778649,
%U A382992 7824114643729925,147476551001252541,2928074880767250057,61078483577649281698,1335438738400978500931
%N A382992 Number of compositions of n that have at least 1 part equal to 1 and any part 1 at position k can be k different colors.
%H A382992 Alois P. Heinz, <a href="/A382992/b382992.txt">Table of n, a(n) for n = 0..450</a>
%F A382992 G.f.: -x^2/(1-x-x^2) + Sum_{i>0} Product_{j=1..i} ( j*x + x^2/(1-x) ).
%F A382992 a(n) = A382991(n) - A000045(n-1).
%e A382992 a(3) = 9 counts: (2, 1_a), (2, 1_b), (1_a, 2), (1_a, 1_a, 1_a), (1_a, 1_a, 1_b), (1_a, 1_a, 1_c), (1_a, 1_b, 1_a), (1_a, 1_b, 1_b), (1_a, 1_b, 1_c).
%p A382992 b:= proc(n, i, t) option remember; `if`(n=0, t, add(
%p A382992       b(n-j, i+1, `if`(j=1, 1, t))*`if`(j=1, i, 1), j=1..n))
%p A382992     end:
%p A382992 a:= n-> b(n, 1, 0):
%p A382992 seq(a(n), n=0..22);  # _Alois P. Heinz_, Apr 23 2025
%o A382992 (PARI)
%o A382992 A_x(N) = {my(x='x+O('x^N)); Vec(-x^2/(1-x-x^2) + sum(i=1,N, prod(j=1,i, j*x + x^2/(1-x))))}
%o A382992 A_x(30)
%Y A382992 Cf. A000045, A008275, A011782, A088305, A238351, A240736, A382991.
%K A382992 nonn,easy
%O A382992 0,3
%A A382992 _John Tyler Rascoe_, Apr 11 2025
%E A382992 Edited by _Alois P. Heinz_, Apr 23 2025