implementation of the tests to join the factors of 3 or 5 to the 1000