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!)
A221640 Number T(n,k) of different numbers of square parts in the set of partitions of an n X k rectangle into squares with integer sides, considering only the list of parts; triangle T(n,k), 1 <= k <= n, read by rows. 1

%I #36 Sep 06 2021 04:26:30

%S 1,1,2,1,2,3,1,3,4,7,1,3,5,9,11,1,4,7,12,18,23,1,4,8,15,23,30,34,1,5,

%T 10,20,27,37,43,52,1,5,12,22,32,42,50,58,68,1,6,14,27,36,47,57,68,76,

%U 87,1,6,16,30,42,54,64,75,85,96,105

%N Number T(n,k) of different numbers of square parts in the set of partitions of an n X k rectangle into squares with integer sides, considering only the list of parts; triangle T(n,k), 1 <= k <= n, read by rows.

%H Alois P. Heinz, <a href="/A221640/b221640.txt">Rows n = 1..14, flattened</a>

%H Christopher Hunt Gribble, <a href="/A221640/a221640_1.cpp.txt">C++ program</a>

%e The triangle begins:

%e . k 1 2 3 4 5 6 7 8

%e n

%e 1 1

%e 2 1 2

%e 3 1 2 3

%e 4 1 3 4 7

%e 5 1 3 5 9 11

%e 6 1 4 7 12 18 23

%e 7 1 4 8 15 23 30 34

%e 8 1 5 10 20 27 37 43 52

%e ...

%e T(4,3) = 4 because there are 4 partitions of a 4 X 3 rectangle into integer-sided squares with different numbers of parts:

%e Partition Number of parts

%e 12 1 X 1 squares 12

%e 8 1 X 1 squares, 1 2 X 2 square 9

%e 4 1 X 1 squares, 2 2 X 2 squares 6

%e 3 1 X 1 squares, 1 3 X 3 square 4

%p b:= proc(n, l) option remember; local i, k, s, t;

%p if max(l[])>n then {} elif n=0 or l=[] then {0}

%p elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))

%p else for k do if l[k]=0 then break fi od; s:={};

%p for i from k to nops(l) while l[i]=0 do s:=s union

%p map(v->v+1, b(n, [l[j]$j=1..k-1,

%p 1+i-k$j=k..i, l[j]$j=i+1..nops(l)]))

%p od; s

%p fi

%p end:

%p T:= (n, k)-> nops(b(max(n,k), [0$min(n,k)])):

%p seq(seq(T(n, k), k=1..n), n=1..10); # _Alois P. Heinz_, Aug 08 2013

%t b[n_, l_List] := b[n, l] = Module[{i, k, s, t}, Which[Max[l] > n, {}, n == 0 || l == {}, {0}, Min[l] > 0, t = Min[l]; b[n - t, l - t], True, For[k = 1, k <= Length[l], k++, If [l[[k]] == 0 , Break[]]]; s = {}; For[i = k, i <= Length[l] && l[[i]] == 0, i++, s = s ~Union~ Map[#+1&, b[n, Join[ l[[1 ;; k-1]], Array[1+i-k&, i-k+1], l[[i+1 ;; Length[l]]]]]]]; s]]; T[n_, k_] := Length[b[Max[n, k], Array[0&, Min[n, k]]]]; Table[Table[ T[n, k], {k, 1, n}], {n, 1, 10}] // Flatten (* _Jean-François Alcover_, Jan 24 2016, after _Alois P. Heinz_ *)

%Y Diagonal = A226937.

%Y Cf. A224697, A227998.

%K nonn,tabl

%O 1,3

%A _Christopher Hunt Gribble_, Aug 08 2013

%E More terms from _Alois P. Heinz_, Aug 08 2013

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 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)