Internal function constructs square lattice designs for resolvable nested block designs with v*v treatments, r complete replicate blocks and nested blocks of size v.
Returns a simple lattice with r = 2 or a triple lattice with r = 3 for any size of v.
Returns a quadruple lattice with r = 4 for any v <= 30.
Returns a lattice for any r < v + 2 if v is a prime or prime power with p^q less than or equal to:
2**12
3**7
5**5
7**4
(11,13,17,19)**3
(23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97)**2
squarelattice(v, r)
is the required block size and is the integer square root of the required number of treatments
is is the required number of replicates