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.

A241627 Number of compositions of n with exactly two descents.

This page as a plain text file.
%I A241627 #10 Aug 27 2021 03:17:13
%S A241627 2,8,29,81,205,469,1013,2059,4021,7558,13780,24440,42358,71867,119715,
%T A241627 196084,316362,503410,791043,1228636,1888003,2872541,4330299,6471778,
%U A241627 9594556,14116745,20622825,29925512,43149302,61843197,88130983,124912824,176132457
%N A241627 Number of compositions of n with exactly two descents.
%H A241627 Joerg Arndt and Alois P. Heinz, <a href="/A241627/b241627.txt">Table of n, a(n) for n = 6..1000</a>
%e A241627 a(6) = 2: [3,2,1], [2,1,2,1].
%e A241627 a(7) = 8: [4,2,1], [3,2,1,1], [3,1,2,1], [1,3,2,1], [2,1,3,1], [1,2,1,2,1], [2,1,1,2,1], [2,1,2,1,1].
%p A241627 b:= proc(n, i) option remember;
%p A241627       `if`(n=0, 1, convert(series(add(b(n-j, j)*
%p A241627       `if`(j<i, x, 1), j=1..n), x, 3), polynom))
%p A241627     end:
%p A241627 a:= n-> coeff(b(n, 0), x, 2):
%p A241627 seq(a(n), n=6..50);
%t A241627 k = 2;
%t A241627 b[n_, i_] := b[n, i] =  If[n == 0, 1, Sum[b[n - j, j]*
%t A241627      If[j < i, x, 1], {j, n}] + O[x]^(k+1)];
%t A241627 a[n_] := SeriesCoefficient[b[n, 0], {x, 0, k}];
%t A241627 a /@ Range[6, 50] (* _Jean-François Alcover_, Aug 27 2021, after Maple code *)
%Y A241627 Column k=2 of A238343 and of A238344.
%K A241627 nonn
%O A241627 6,1
%A A241627 _Joerg Arndt_ and _Alois P. Heinz_, Apr 26 2014