OFFSET
1,2
COMMENTS
A rectangle is minimal with respect to its longest side.
FORMULA
a(k^2 - 1) = k + 1.
a(k^2) = k.
EXAMPLE
The longest side of a minimal rectangle of n = 5 squares has side length a(5) = 4:
+---+---+---+---+ +---+---+---+---+
| 1 | 1 | | | 1 | | 1 |
+---+---+ 2 + or +---+ 2 +---+
| 1 | 1 | | | 1 | | 1 |
+---+---+---+---+ +---+---+---+---+
a(6) = 3:
+---+---+---+ +---+---+
| 1 | 1 | 1 | | 1 | 1 |
+---+---+---+ +---+---+
| 1 | | or | 1 | 1 |
+---+ 2 + +---+---+
| 1 | | | 1 | 1 |
+---+---+---+ +---+---+
a(7) = 4:
+---+---+---+---+
| 1 | 1 | |
+---+---+ 2 +
| 1 | 1 | |
+---+---+---+---+
| | |
+ 2 + 2 +
| | |
+---+---+---+---+
MATHEMATICA
good[s_, w_] := w == {} || s >= Ceiling[Sqrt[Length[w]]] Max[w]; no1[w_] := Select[w, # > 1 &]; a[n_] := Block[{m = Ceiling@ Sqrt@ n, x, p, ok = False}, While[! ok, Do[p = Select[Sqrt@ IntegerPartitions[m x, {n}, Range[Sqrt@ n]^2], good[x, no1[#]] &]; If[p != {}, ok = True; Print["a[", n, "]=", m, " (", x, " x ", m, ") = ", no1@ First@ p]; ok = True; Break[]], {x, m}]; m++]; m - 1]; Array[a, 100] (* correct at least for n <= 1000, Giovanni Resta, Nov 28 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Kagey, Nov 26 2017
EXTENSIONS
More terms from Giovanni Resta, Nov 28 2017
STATUS
approved