login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A332310 Number of compositions (ordered partitions) of n into distinct parts where no part is a multiple of 4. 2
1, 1, 1, 3, 2, 3, 9, 5, 12, 17, 23, 43, 50, 55, 67, 111, 144, 273, 291, 377, 410, 689, 827, 961, 1860, 1663, 2647, 3573, 4610, 4683, 6753, 8465, 11232, 16835, 19985, 24073, 29258, 40411, 51367, 58431, 72084, 99807, 119409, 176387, 199922, 250841, 290123 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Table of n, a(n) for n=0..46.

Index entries for sequences related to compositions

EXAMPLE

a(7) = 5 because we have [7], [6, 1], [5, 2], [2, 5] and [1, 6].

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, 4), 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, 4], 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

Cf. A001935, A032020, A032021, A070048, A332309, A332311.

Sequence in context: A261999 A216829 A331846 * A022460 A010605 A120879

Adjacent sequences:  A332307 A332308 A332309 * A332311 A332312 A332313

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 22 15:38 EDT 2021. Contains 343177 sequences. (Running on oeis4.)