login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A327710 Number of compositions of n into distinct parts such that the difference between any two parts is at least two. 3

%I #38 Jul 12 2021 13:48:23

%S 1,1,1,1,3,3,5,5,7,13,15,21,29,35,43,55,87,99,137,173,235,277,363,429,

%T 545,755,895,1135,1443,1827,2285,2837,3463,4285,5199,6309,8237,9755,

%U 12091,14743,18351,22251,27833,33125,40819,49045,59691,70869,86033,106163

%N Number of compositions of n into distinct parts such that the difference between any two parts is at least two.

%C All terms are odd.

%H Alois P. Heinz, <a href="/A327710/b327710.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = Sum_{k>=0} k! * A268187(n,k).

%F G.f.: Sum_{k>=0} k! * x^(k^2) / Product_{j=1..k} (1 - x^j). - _Ilya Gutkovskiy_, Dec 04 2020

%e a(9) = 13: 135, 153, 315, 351, 513, 531, 36, 63, 27, 72, 18, 81, 9.

%p b:= proc(n, i, p) option remember; `if`(i*(i+1)/2<n, 0,

%p `if`(n=0, p!, b(n, i-1, p)+b(n-i, min(n-i, i-2), p+1)))

%p end:

%p a:= n-> b(n$2, 0):

%p seq(a(n), n=0..50);

%p # second Maple program:

%p b:= proc(n, i) option remember; `if`(n=0, 1,

%p `if`(i<1, 0, b(n, i-1)+b(n-i, min(n-i, i))))

%p end:

%p a:= n-> add(k!*b(n-k^2, k), k=0..floor(sqrt(n))):

%p seq(a(n), n=0..50);

%t b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0,

%t b[n, i - 1] + b[n - i, Min[n - i, i]]]];

%t a[n_] := Sum[k!*b[n - k^2, k], {k, 0, Floor[Sqrt[n]]}];

%t Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Jul 12 2021, after _Alois P. Heinz_ *)

%Y Cf. A003114, A032020, A268187, A268188, A328222.

%K nonn

%O 0,5

%A _Alois P. Heinz_, Feb 24 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 1 12:47 EDT 2024. Contains 375591 sequences. (Running on oeis4.)