If N is any number not divisible by 2 or 5, there is some power 10^K which is 1 (mod N). We can build any residue R (mod N) that we please by summing 1 + 10^K + 10^2K + ... + 10^(K(R-1)). So we can choose our desired residues mod 3,7,11,13,17,... and combine them into a single residue mod N = 3*7*11*... This leaves us free to select any combination of {divides or not} for each different prime (other than 2 or 5). Rich ----- Quoting "Keith F. Lynch" <kfl@KeithLynch.net>:
That makes me wonder, is it always possible to find a number which is all 1s and 0s in base 10 that is divisible by whatever numbers you choose? It's not possible to pick and choose which numbers you want it to be divisible by, given that no number in that form can be divisible by 2 but not by 5 or vice versa. But other than that, is it always possible to pick and choose which primes it is and isn't divisible by? For instance to find a number in that form which is divisible by only the primes (other than 2 and 5, if applicable) that divide your home phone number?