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.

A383870 Number of compositions of n such that none of the smallest parts are adjacent.

This page as a plain text file.
%I A383870 #15 May 14 2025 10:31:55
%S A383870 1,1,1,3,4,9,15,29,53,98,180,336,618,1142,2110,3899,7197,13283,24509,
%T A383870 45218,83396,153769,283463,522449,962732,1773742,3267417,6018030,
%U A383870 11082693,20407174,37572633,69169726,127326924,234362474,431343281,793831500,1460854117
%N A383870 Number of compositions of n such that none of the smallest parts are adjacent.
%H A383870 Alois P. Heinz, <a href="/A383870/b383870.txt">Table of n, a(n) for n = 0..2000</a>
%F A383870 G.f.: 1 + Sum_{j>=0} Sum_{i>j} (binomial(i,i-j-1) * x^(j+1) * (x^2/(1 - x))^(i-1))/(1 - x^(i+j)).
%e A383870 a(5) = 9 counts: (1,2,2), (1,3,1), (1,4), (2,1,2), (2,2,1), (2,3), (3,2), (4,1), (5).
%p A383870 b:= proc(n, i, p) option remember; `if`(i<1, 0,
%p A383870      `if`(irem(n, i, 'r')=0, p!*binomial(p+1, r), 0)+
%p A383870       add(b(n-i*j, min(n-i*j, i-1), p+j)/j!, j=0..n/i))
%p A383870     end:
%p A383870 a:= n-> `if`(n=0, 1, b(n$2, 0)):
%p A383870 seq(a(n), n=0..36);  # _Alois P. Heinz_, May 13 2025
%o A383870 (PARI)
%o A383870 A_x(N) ={Vec(1+sum(j=0,N, sum(i=j+1,N-j, (binomial(i,i-j-1) * x^(j+1) * (x^2/(1-x))^(i-1) )/(1-x^(i+j))))+O('x^N))}
%o A383870 A_x(50)
%Y A383870 Cf. A003242, A007318, A011782, A074909, A105039, A238342.
%K A383870 nonn,easy
%O A383870 0,4
%A A383870 _John Tyler Rascoe_, May 13 2025