How many integers n between 1 and 10,000 are there such that $7/n$ is a terminating decimal?
2 , 4 , 5 , 7 , 8 , 10 , 14 , 16 , 20 , 25 , 28 , 32 , 35 , 40 , 50 , 56 , 64 , 70 , 80 , 100 , 112 , 125 , 128 , 140 , 160 , 175 , 200 , 224 , 250 , 256 , 280 , 320 , 350 , 400 , 448 , 500 , 512 , 560 , 625 , 640 , 700 , 800 , 875 , 896 , 1000 , 1024 , 1120 , 1250 , 1280 , 1400 , 1600 , 1750 , 1792 , 2000 , 2048 , 2240 , 2500 , 2560 , 2800 , 3125 , 3200 , 3500 , 3584 , 4000 , 4096 , 4375 , 4480 , 5000 , 5120 , 5600 , 6250 , 6400 , 7000 , 7168 , 8000 , 8192 , 8750 , 8960 , Total == 78 such integers.
Note: A short code in C++ found all these integers.
How many integers n between 1 and 10,000 are there such that $7/n$ is a terminating decimal?
I found this easily in google:
"To find out whether a fraction will have a terminating or recurring decimal, look at the prime factors of the denominator when the fraction is in its most simple form. If they are made up of 2s and/or 5s, the decimal will terminate."
So that means that the desired numbers must be of the form
\(2^a*5^b\qquad or \qquad 7*2^a*5^b\)
where a and b are integers greater or equal to 0
I just used excel to help me organize the possibilities.
I also got 78 possibilities