Add possibleSquares and use Stream.iterate.