login
Number A(n,k) of set partitions of [n] such that the difference between each element and its block index is a multiple of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.
10

%I #19 Oct 18 2018 16:55:11

%S 1,1,1,1,1,1,1,1,2,1,1,1,1,5,1,1,1,1,2,15,1,1,1,1,1,3,52,1,1,1,1,1,2,

%T 7,203,1,1,1,1,1,1,3,14,877,1,1,1,1,1,1,2,4,39,4140,1,1,1,1,1,1,1,3,9,

%U 95,21147,1,1,1,1,1,1,1,2,4,18,304,115975,1

%N Number A(n,k) of set partitions of [n] such that the difference between each element and its block index is a multiple of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

%H Alois P. Heinz, <a href="/A274835/b274835.txt">Antidiagonals n = 0..140, flattened</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>

%e A(3,0) = 1: 1|2|3.

%e A(3,1) = 5: 123, 12|3, 13|2, 1|23, 1|2|3.

%e A(5,2) = 7: 135|24, 13|24|5, 15|24|3, 1|24|35, 15|2|3|4, 1|2|35|4, 1|2|3|4|5.

%e A(7,3) = 9: 147|25|36, 14|25|36|7, 17|25|36|4, 1|25|36|47, 17|2|36|4|5, 1|2|36|47|5, 17|2|3|4|5|6, 1|2|3|47|5|6, 1|2|3|4|5|6|7.

%e Square array A(n,k) begins:

%e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 5, 2, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 15, 3, 2, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 52, 7, 3, 2, 1, 1, 1, 1, 1, 1, ...

%e 1, 203, 14, 4, 3, 2, 1, 1, 1, 1, 1, ...

%e 1, 877, 39, 9, 4, 3, 2, 1, 1, 1, 1, ...

%e 1, 4140, 95, 18, 5, 4, 3, 2, 1, 1, 1, ...

%e 1, 21147, 304, 33, 11, 5, 4, 3, 2, 1, 1, ...

%e 1, 115975, 865, 89, 22, 6, 5, 4, 3, 2, 1, ...

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

%p add(`if`(irem(j-t, k)=0, b(n-1, k, max(m, j),

%p irem(t+1, k)), 0), j=1..m+1))

%p end:

%p A:= (n, k)-> `if`(k=0, 1, b(n, k, 0, 1)):

%p seq(seq(A(n, d-n), n=0..d), d=0..14);

%t b[n_, k_, m_, t_] := b[n, k, m, t] = If[n==0, 1, Sum[If[Mod[j-t, k]==0, b[n-1, k, Max[m, j], Mod[t+1, k]], 0], {j, 1, m+1}]]; A[n_, k_]:= If[k==0, 1, b[n, k, 0, 1]]; Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* _Jean-François Alcover_, Dec 18 2016, after _Alois P. Heinz_ *)

%Y Columns k=0-10 give: A000012, A000110, A274538, A274836, A274837, A274838, A274839, A274840, A274841, A274842, A274843.

%Y Main diagonal gives A000012.

%Y A(n,ceiling(n/2)) gives A008619.

%Y A(3n,n) gives A094002.

%K nonn,tabl

%O 0,9

%A _Alois P. Heinz_, Jul 08 2016