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.

A368501 Number of compositions (ordered partitions) of n into distinct parts not greater than n/2.

This page as a plain text file.
%I A368501 #20 Dec 31 2023 15:28:35
%S A368501 1,0,0,0,0,0,6,0,6,6,36,30,66,60,120,234,318,432,666,894,1272,2226,
%T A368501 2772,3960,5496,7524,10068,13776,22488,27756,39162,51264,70398,91386,
%U A368501 124152,158574,247554,301656,416748,537690,730854,929196,1248798,1576014,2078328,2956110
%N A368501 Number of compositions (ordered partitions) of n into distinct parts not greater than n/2.
%H A368501 Alois P. Heinz, <a href="/A368501/b368501.txt">Table of n, a(n) for n = 0..5000</a>
%H A368501 <a href="/index/Com#comp">Index entries for sequences related to compositions</a>
%F A368501 a(n) = Sum_{k=1..floor(n/2)} A072575(n,k) for n>=1. - _Alois P. Heinz_, Dec 31 2023
%e A368501 a(6) = 6 because we have [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2] and [3,2,1].
%p A368501 b:= proc(n, i, p) option remember; `if`(i*(i+1)/2<n, 0,
%p A368501      `if`(n=0, p!, b(n, i-1, p)+b(n-i, min(n-i, i-1), p+1)))
%p A368501     end:
%p A368501 a:= n-> b(n, iquo(n, 2), 0):
%p A368501 seq(a(n), n=0..45);  # _Alois P. Heinz_, Dec 28 2023
%t A368501 Table[Sum[Count[IntegerPartitions[n, {k}], _?(And[UnsameQ @@ #, AllTrue[#, # <= n/2 &]] &)] k!, {k, 0, n}], {n, 0, 45}]
%Y A368501 Cf. A008289, A032020, A072575, A110618, A258259, A368484.
%K A368501 nonn
%O A368501 0,7
%A A368501 _Ilya Gutkovskiy_, Dec 27 2023