From: Craig Demyanovich Date: 2008-10-19T00:02:29+09:00 Subject: Re: Counting ------=_Part_12293_16175371.1224342192956 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline The OP needs multiples of 2 and 6. Since all multiples of 6 are also multiples of 2, just checking for multiples of 6 suffices. However, if d = 6, your two approaches don't produce the same result. For d = 6, they produce 83498 and 83166, respectively. 83166 is the correct answer, I believe. Regards, Craig ------=_Part_12293_16175371.1224342192956--