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!)
A332311 Number of compositions (ordered partitions) of n into distinct parts where no part is a multiple of 5. 3
1, 1, 1, 3, 3, 4, 9, 11, 11, 19, 44, 31, 61, 87, 117, 144, 279, 311, 389, 541, 640, 1003, 1225, 2145, 2493, 3452, 3507, 5417, 6671, 8821, 11580, 17959, 21043, 26289, 34797, 41536, 59637, 72707, 85871, 110947, 172472, 175873, 249691, 327801, 418779, 512748 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
EXAMPLE
a(6) = 9 because we have [6], [4, 2], [3, 2, 1], [3, 1, 2], [2, 4], [2, 3, 1], [2, 1, 3], [1, 3, 2] and [1, 2, 3].
MAPLE
b:= proc(n, i, p) option remember; `if`(i*(i+1)/2<n, 0, `if`(n=0,
p!, add(b(n-i*j, i-1, p+j), j=0..min(irem(i, 5), 1, n/i))))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..55); # Alois P. Heinz, Feb 09 2020
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[i(i+1)/2 < n, 0, If[n == 0, p!, Sum[b[n - i j, i - 1, p + j], {j, 0, Min[Mod[i, 5], 1, n/i]}]]];
a[n_] := b[n, n, 0];
a /@ Range[0, 55] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A185395 A060372 A128036 * A332340 A045794 A065678
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 09 2020
STATUS
approved

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 April 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)