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.

A224697 Number A(n,k) of different ways to divide an n X k rectangle into subsquares, considering only the list of parts; square array A(n,k), n >= 0, k >= 0, read by antidiagonals.

This page as a plain text file.
%I A224697 #34 Nov 11 2019 21:36:29
%S A224697 1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,2,1,1,1,1,3,3,3,1,1,1,1,3,4,4,3,
%T A224697 1,1,1,1,4,5,7,5,4,1,1,1,1,4,7,9,9,7,4,1,1,1,1,5,8,14,11,14,8,5,1,1,1,
%U A224697 1,5,10,17,20,20,17,10,5,1,1
%N A224697 Number A(n,k) of different ways to divide an n X k rectangle into subsquares, considering only the list of parts; square array A(n,k), n >= 0, k >= 0, read by antidiagonals.
%H A224697 Alois P. Heinz and Christopher Hunt Gribble, <a href="/A224697/b224697.txt">Antidiagonals n = 0..27, flattened</a> (first 25 antidiagonals from Alois P. Heinz)
%e A224697 A(4,5) = 9 because there are 9 ways to divide a 4 X 5 rectangle into subsquares, considering only the list of parts: [20(1 X 1)], [16(1 X 1), 1(2 X 2)], [12(1 X 1), 2(2 X 2)], [11(1 X 1), 1(3 X 3)], [8(1 X 1), 3(2 X 2)], [7(1 X 1), 1(2 X 2), 1(3 X 3)], [4(1 X 1), 4(2 X 2)], [4(1 X 1), 1(4 X 4)], [3(1 X 1), 2(2 X 2), 1(3 X 3)].  There is no way to divide this rectangle into [2(1 X 1), 2(3 X 3)].
%e A224697 Square array A(n,k) begins:
%e A224697   1, 1, 1,  1,  1,  1,  1,   1,   1,   1, ...
%e A224697   1, 1, 1,  1,  1,  1,  1,   1,   1,   1, ...
%e A224697   1, 1, 2,  2,  3,  3,  4,   4,   5,   5, ...
%e A224697   1, 1, 2,  3,  4,  5,  7,   8,  10,  12, ...
%e A224697   1, 1, 3,  4,  7,  9, 14,  17,  24,  29, ...
%e A224697   1, 1, 3,  5,  9, 11, 20,  26,  36,  48, ...
%e A224697   1, 1, 4,  7, 14, 20, 31,  47,  71,  95, ...
%e A224697   1, 1, 4,  8, 17, 26, 47,  57, 102, 143, ...
%e A224697   1, 1, 5, 10, 24, 36, 71, 102, 148, 238, ...
%e A224697   1, 1, 5, 12, 29, 48, 95, 143, 238, 312, ...
%p A224697 b:= proc(n, l) option remember; local i, k, s, t;
%p A224697       if max(l[])>n then {} elif n=0 or l=[] then {[]}
%p A224697     elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
%p A224697     else for k do if l[k]=0 then break fi od; s:={};
%p A224697          for i from k to nops(l) while l[i]=0 do s:=s union
%p A224697              map(x->sort([x[], 1+i-k]), b(n, [l[j]$j=1..k-1,
%p A224697                  1+i-k$j=k..i, l[j]$j=i+1..nops(l)]))
%p A224697          od; s
%p A224697       fi
%p A224697     end:
%p A224697 A:= (n, k)-> `if`(n>=k, nops(b(n, [0$k])), nops(b(k, [0$n]))):
%p A224697 seq(seq(A(n, d-n), n=0..d), d=0..12);
%t A224697 b[n_, l_] := b[n, l] = Module[{i, k, m, s, t}, Which[Max[l] > n, {}, n == 0 || l == {}, {{}}, Min[l] > 0, t = Min[l]; b[n-t, l-t], True, k = Position[l, 0, 1][[1, 1]]; s = {}; For[i = k, i <= Length[l] && l[[i]] == 0, i++, s = s ~Union~ Map[Function[x, Sort[Append[x, 1+i-k]]], b[n, Join[l[[1 ;; k-1]], Array[1+i-k&, i-k+1], l[[i+1 ;; -1]] ] ]]]; s]]; a[n_, k_] := If[n >= k, Length @ b[n, Array[0&, k]], Length @ b[k, Array[0&, n]]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* _Jean-François Alcover_, Dec 19 2013, translated from Maple *)
%Y A224697 Columns (or rows) k=0+1, 2-5 give: A000012, A008619, A001399, A008763(n+4), A187753.
%Y A224697 Main diagonal gives: A034295.
%Y A224697 Cf. A225622.
%K A224697 nonn,tabl
%O A224697 0,13
%A A224697 _Alois P. Heinz_, Apr 15 2013