```On Apr 28, 9:04 pm, Ari Brown <a... / aribrown.com> wrote:
> On Apr 27, 2007, at 7:59 AM, Ruby Quiz wrote:
> >    1. Starting with the next to last digit and continuing with every
> > other
> >       digit going back to the beginning of the card, double the digit
> >    2. Sum all doubled and untouched digits in the number
> >    3. If that total is a multiple of 10, the number is valid
>
> > For example, given the card number 4408 0412 3456 7893:
>
> >    Step 1:  8 4 0 8 0 4 2 2 6 4 10 6 14 8 18 3
> >    Step 2:  8+4+0+8+0+4+2+2+6+4+1+0+6+1+4+8+1+8+3 = 70
> >    Step 3:  70 % 10 == 0
>
> > Thus that card is valid.
>
> Uh, this is probably just affecting me but....
>
> In his example, after he doubles the second to last digit (call it
> d), he uses mod10 on it (9*2 = 18 %10 = 8). That is the way to get
> his numbers, but a) where does he say that and b) where do the 10 and
> 14 come from?

The confusing part (that I didn't catch when I read it) is that step 2
is to sum all the *digits*, not the numbers.

So
step 1) 9 * 2 = 18
step 2) 1 + 8

He's not modding the result of the multiplication by 10, but rather
adding up the resulting component digits. The same occurs with the 10
and 14 (which Philip pointed out are the result of 5*2 and 7*2,
respectively).

```