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.
%I A216708 #45 Mar 05 2021 07:31:42 %S A216708 0,2,2,10,10,18,48,56,86,124,298,336,540,722,1070,2122,2614,3810,5316, %T A216708 7496,9986,18940,22558,33336,44568,63074,82034,114754,187642,234690, %U A216708 328536,441872,602006,794020,1072546,1389408,2207532,2706266,3752462,4900474,6681022,8574906 %N A216708 Number of compositions (ordered partitions) of n into 2 or more distinct nonnegative parts. %C A216708 If permutations are considered equivalent then a(n)=A087135(n)=2*A000009(n) for n>0. %C A216708 All terms are even. - _Alois P. Heinz_, Aug 18 2018 %H A216708 Alois P. Heinz, <a href="/A216708/b216708.txt">Table of n, a(n) for n = 0..5000</a> %H A216708 César Eliud Lozada, <a href="/A216708/a216708.pdf">Illustration for terms up to n=9</a> %F A216708 From _Joerg Arndt_, Sep 17 2012: (Start) %F A216708 G.f. sum(k>=0, (k+1)!*x^((k^2+k)/2) / prod(j=1..k+1, 1-x^j)) - 1/(1-x); %F A216708 explanation: the g.f. for partitions into at least two positive parts (A111133) is %F A216708 sum(k>=0, x^((k^2+k)/2) / prod(j=1..k, 1-x^j)) - 1/(1-x) %F A216708 (i.e., the g.f. of A000009 minus the g.f. 1/(1-x) for the constant sequence a(n)=1 that counts the single partition n = [n]); %F A216708 the factor (k+1)! in the g.f. of this function provides for the permutations of the parts, including a zero. %F A216708 (End) %e A216708 a(2)=2 because 2 = 0+2 = 2+0 (2 ways) %e A216708 a(3)=10 because 3 = 0+3 = 1+2 = 2+1 = 3+0 = 0+1+2 = 0+2+1 = 1+0+2 = 1+2+0 = 2+0+1 = 2+1+0 (10 ways) %p A216708 b:= proc(n, i, p) option remember; (m-> `if`(m<n, 0, `if`(n=0, %p A216708 `if`(p=0, 0, `if`(p=1, 2, p!*(p+2))), b(n, i-1, p)+ %p A216708 b(n-i, min(n-i, i-1), p+1))))(i*(i+1)/2) %p A216708 end: %p A216708 a:= n-> b(n$2, 0): %p A216708 seq(a(n), n=0..42); # _Alois P. Heinz_, Aug 18 2018 %t A216708 b[n_, i_, p_] := b[n, i, p] = With[{m = i(i+1)/2}, If[m < n, 0, If[n == 0, %t A216708 If[p == 0, 0, If[p == 1, 2, p! (p+2)]], b[n, i-1, p] + %t A216708 b[n-i, Min[n-i, i-1], p+1]]]]; %t A216708 a[n_] := b[n, n, 0]; %t A216708 a /@ Range[0, 42] (* _Jean-François Alcover_, Mar 05 2021, after _Alois P. Heinz_ *) %o A216708 (PARI) %o A216708 N=66; x='x+O('x^N); %o A216708 gf=sum(k=0,N, (k+1)!*x^((k^2+k)/2) / prod(j=1,k+1, 1-x^j)) - 1/(1-x); %o A216708 v=Vec(gf); %o A216708 vector(#v+1,n,if(n==1,0,v[n-1])) %o A216708 /* _Joerg Arndt_, Sep 17 2012 */ %Y A216708 Cf. A216695, A087135, A000009, A032020. %K A216708 nonn %O A216708 0,2 %A A216708 _César Eliud Lozada_, Sep 16 2012 %E A216708 More terms, _Joerg Arndt_, Sep 17 2012