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!)
A275679 Number of set partitions of [n] with alternating block size parities. 5
1, 1, 1, 4, 3, 20, 43, 136, 711, 1606, 12653, 36852, 250673, 1212498, 6016715, 45081688, 196537387, 1789229594, 8963510621, 76863454428, 512264745473, 3744799424978, 32870550965259, 219159966518160, 2257073412153459, 15778075163815474, 165231652982941085 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
EXAMPLE
a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 3: 1234, 1|23|4, 1|24|3.
a(5) = 20: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 12|3|45, 1345|2, 134|25, 135|24, 13|245, 13|2|45, 145|23, 14|235, 15|234, 1|2345, 14|2|35, 15|2|34.
MAPLE
b:= proc(n, t) option remember; `if`(n=0, 1, add(
`if`((i+t)::odd, b(n-i, 1-t)*binomial(n-1, i-1), 0), i=1..n))
end:
a:= n-> `if`(n=0, 1, b(n, 0)+b(n, 1)):
seq(a(n), n=0..35);
MATHEMATICA
b[n_, t_] := b[n, t] = If[n==0, 1, Sum[If[OddQ[i+t], b[n-i, 1-t] * Binomial[n-1, i-1], 0], {i, 1, n}]]; a[n_] := If[n==0, 1, b[n, 0] + b[n, 1]]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Feb 27 2017, translated from Maple *)
CROSSREFS
Sequence in context: A280615 A281042 A076589 * A326818 A259229 A052039
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 05 2016
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 18 21:51 EDT 2024. Contains 371781 sequences. (Running on oeis4.)