## Clouds, Shy Squares, and Diophantus

```Do there exist 5 positive integers such that the product of any two
is one less than a square?  For a discussion of this and related
questions, see If ab+1, ac+1, bc+1 are squares,... .
As an aside, there's a connection between this problem and the sets
of points called "clouds" by L. Comtet in his book "Advanced
Combinatorics".  If we have 3 (distinct) positive integers a,b,c
(e.g., 1,3,8) such that each of the three pairwise products ab,ac,ad
is a "shy square" (defined as one less than a square), then obviously
the square (abc)^2 is expressible as a product of three shy squares,
i.e., (abc)^2 = (A^2-1)(B^2-1)(C^2-1).

However, if we have 4 distinct integers a,b,c,d (e.g., 1,3,8,120)
such that each of the SIX pairwise products is a shy square, then
the square (abcd)^2 must not only be expressible as a product of
four shy squares, it must be so expressible in THREE distinct ways,
corresponding to the three ways of choosing four out of the six
pairwise products such that each of a,b,c,d appears exactly twice.
For example, with a=1,b=3,c=8,d=120 we have

(2880)^2  =  (2^2 - 1)(3^2 - 1)(19^2 - 1)(31^2 - 1)
=  (2^2 - 1)(5^2 - 1)(11^2 - 1)(31^2 - 1)
=  (3^2 - 1)(5^2 - 1)(11^2 - 1)(19^2 - 1)

Now, if we imagine 5 distinct integers a,b,c,d,e such that each of
the TEN pairwise products is a shy square, then the square (abcde)^2
must be expressible as a product of 5 distinct shy squares in TWELVE
distinct ways.  It isn't trivial to find numbers that are expressible
as products of shy squares in multiple ways.  For example, no one has
ever found ANY integer (let alone a square) that is expressible in
the form (n^2 - 1)(m^2 - 1) in more than five distinct ways. (And
only 6 five-way expressible numbers are known).

Anyway, the connection to Comtet's "clouds" is that if you go on to
consider N distinct integers such that each of the N(N-1)/2 pairwise
products is a shy square, then the square of the product of those N
integers must be expressible as a product of N shy squares in c(N)
distinct ways, where the first few values of c(N) are

N    c(N)
---  -----
3      1
4      3
5     12
6     70
7    465
8   3507

This is the number of ways of choosing N out of N(N-1)/2 pairwise
products of N numbers such that each of the individual numbers
appears exactly twice.  Checking the Encyclopedia of Integer
Sequences (Sloane and Plouffe) we find that this is sequence M2937,
which Comtet defined in terms of the intersection points of N lines
in general position in the plane.

Incidentally the question about 5 positive integers such that the
product of any two is one less than a square goes back to Diophantus.
It's true that Diophantus only required rational numbers, rather than
restricting his domain to integers, but of course many of his results
have relevance for integers too.  In Book III of The Arithmetica he
treated the problem of finding three numbers such that the product of
any two of them increased by 1 is a square, and he gave the triple
a=x, b=x+2, c=4x+4.   Then in Problem 20, Book IV, he treated the
problem of finding FOUR numbers such that all six pairwise products
are 1 less than a square.  He built on his triple solution a,b,c, but
oddly enough he *didn't* use the case x=1 (as Fermat later did to
find 1,3,8,120).  Instead he decided to make the product of the first
and fourth numbers equal to one less than (3x+1)^2.  I suppose he
was just following the pattern

ab+1 = (1x+1)^2
ac+1 = (2x+1)^2       bc+1 = (2x+3)^2
ad+1 = (3x+1)^2       bd+1 =   ?          cd+1 = (6x+5)^2

Notice that setting ad+1 = (3x+1)^2 forces d to be 9x+6, which
automatically gives cd+1 = (6x+5)^2.  Diophantus didn't comment
much on this, but it's clearly systematic.  For example, if he
went on to a 5th number e such that ae+1 = (4x+1)^2 it would
force e to be 16x+8, which automatically gives de+1 = (12x+7)^2,
and so on.

Anyway, all he needs to do now is find a (rational) value of x such
that  bd+1 =  9x^2 + 24x + 13  is a (rational) square.  He reasons
that if we assume bd+1 = (3x+k)^2 for some integer k then we will
have (24-6k)x + (13-k^2) = 0, and so x can be any number of the form
x = (k^2 - 13)/(24 - 6k).  He chooses k=-4, which gives x=1/16, so
his four numbers are 1/16,  33/16,  68/16, and  105/16.  (He might
have chosen k=-11 to give x=6/5.)

Euler gave a family of such rational quintuples, including these
two examples

1/2   5/2   6    48    44880/128881
1     3    8   120   777480/8288641

```