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.

A274547 Number of set partitions of [n] with alternating parity of elements.

This page as a plain text file.
%I A274547 #18 Jun 09 2023 14:40:43
%S A274547 1,1,2,4,8,18,40,101,254,723,2064,6586,21143,74752,266078,1029983,
%T A274547 4013425,16843526,71136112,321150717,1458636308,7038678613,
%U A274547 34161890155,175261038904,904125989974,4909033438008,26795600521492,153376337926066,882391616100249
%N A274547 Number of set partitions of [n] with alternating parity of elements.
%H A274547 Alois P. Heinz, <a href="/A274547/b274547.txt">Table of n, a(n) for n = 0..36</a>
%H A274547 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>
%F A274547 a(n) = Sum_{k=0..n} A274581(n,k).
%F A274547 a(n) = A363519(n,max(0,n-1)). - _Alois P. Heinz_, Jun 07 2023
%e A274547 a(5) = 18: 12345, 1234|5, 123|45, 123|4|5, 12|345, 12|34|5, 12|3|45, 12|3|4|5, 145|23, 1|2345, 1|234|5, 1|23|45, 1|23|4|5, 145|2|3, 1|2|345, 1|2|34|5, 1|2|3|45, 1|2|3|4|5.
%e A274547 a(6) = 40: 123456, 12345|6, 1234|56, 1234|5|6, 123|456, 123|45|6, 123|4|56, 123|4|5|6, 1256|34, 12|3456, 12|345|6, 12|34|56, 12|34|5|6, 1256|3|4, 12|3|456, 12|3|45|6, 12|3|4|56, 12|3|4|5|6, 145|236, 145|23|6, 1|23456, 1|2345|6, 1|234|56, 1|234|5|6, 1|23|456, 1|23|45|6, 1|23|4|56, 1|23|4|5|6, 145|2|36, 145|2|3|6, 1|256|34, 1|2|3456, 1|2|345|6, 1|2|34|56, 1|2|34|5|6, 1|256|3|4, 1|2|3|456, 1|2|3|45|6, 1|2|3|4|56, 1|2|3|4|5|6.
%p A274547 b:= proc(l, i, t) option remember; `if`(l=[], 1, add(`if`(l[j]=t,
%p A274547        b(subsop(j=[][], l), j, 1-t), 0), j=[1, $i..nops(l)]))
%p A274547     end:
%p A274547 a:= n-> b([seq(irem(i, 2), i=2..n)], 1, 0):
%p A274547 seq(a(n), n=0..25);
%t A274547 b[l_, i_, t_] := b[l, i, t] = If[l == {}, 1, Sum[If[l[[j]] == t, b[ReplacePart[l, j -> Sequence[]], j, 1-t], 0], {j, Prepend[Range[i, Length[l]], 1]}]]; a[n_] := b[Table[Mod[i, 2], {i, 2, n}], 1, 0]; Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Feb 15 2017, translated from Maple *)
%Y A274547 Row sums of A274581.
%Y A274547 Cf. A124419, A274310 (parities alternate within blocks), A363519.
%Y A274547 Column k=2 of A274859.
%K A274547 nonn
%O A274547 0,3
%A A274547 _Alois P. Heinz_, Jun 27 2016