Given a range of numbers, is it possible to skip multiples of $2$ and $3$ without division? First of all, is there a name for the observation that starting at $5$, alternating between adding $2$ and $4$, will skip all multiples of $2$ and $3$? E.g. $5+2=7$, $7+4=11$, $11+2=13$, $13+4=17$ (notice how $9$ and $15$ are skipped because they're multiples of $3$). I guess this is just an application of wheel factorization?
My question is, given an arbitrary range of numbers, can this be applied? In other words what if one didn't want to start at $5$? How would they know to start by adding $2$ or $4$?
For example how would one apply this procedure starting at $19$? It would be a mistake to add $2$ because $19+2=21$ which is a multiple of $3$, but adding $4$ gets us back on the right track e.g. $19+4=23$, $23+2=25$, $25+4 = 29$
It can be assumed the starting number in the range is odd: it can be checked by dividing by $2$ and if it is, the next is odd.
 A: This is a consequence of arithmetic mod 6. A number $n$ is not divisible by 3 nor 2 iff $gcd(lcm(2, 3), n) = gcd(6, n) = 1$; that is, iff $n \equiv 5$ or $1$ modulo 6. Clearly, starting at 1 then adding 4 and 2 repeatedly (or starting at 5 as the questioner suggests) would successfully hit exactly those numbers not divisible by 2 nor 3.
A: You already know to start with an odd number, which has a final digit of $1,3,5,7,\text{ or }9$. If the arbitrary range you refer to begins with an odd number $n$, start with that. If the arbitrary range begins with an even number $n$, begin by looking at $n+1$.
Add the digits of the starting number together, repeatedly, until you get a single digit. For example, $275,897 \rightarrow 38 \rightarrow 11 \rightarrow 2$.
If the resulting digit is $1,4,7$, start your process by adding $4$ (then $2$, then $4$, etc.). If the resulting digit is $2,5,8$, start your process by adding $2$ (then $4$, then $2$, etc.). If the resulting digit is $3,6,9$, the number is divisible by $3$, so add $2$ to that starting number and repeat the process. For example, $275,895 \rightarrow 36 \rightarrow 9$, so add $2$ to get $275,897$ (which was picked in the first example), and use the method to decide what to add first, $2$ or $4$.
$275897$ collapses to $2$, so start by adding $2$. The sequence $275897; 275899; 275903; 275905$ meets your criteria.
This algorithm accomplishes what the more detailed modular mathematics in the other answers explained, but avoids any necessity of performing division.
A: Suppose that it is necessary to determine the multiples of 3, without division and without operations related to division, between the values of 85 and 95.
Then by knowing the first three columns of odd numbers between odd multiples of 5, it is known that the nearest multiple of 3 to 35 is 33 which is a 1-count from 35 in the column of odd numbers between 25 and 35. Then the next 1-count column, according to an increment of 30, has numerical brackets of 55 and 65. And the next 1-count column from that column has numerical brackets of 85 and 95. Then the first multiple of 3 less than 95 is a 1-count from 95 to the value of 93 .
Here is a link:
http://www.kbhscape.com/3multiple.htm
.
