9/18/17

number 9

Code: PU, SF 
P=10 (k=1)
10b+a = b+a (mod 9)
Formulae:
Number N is divisible by 9 iff sum of digits is divisible by 9

Example:
Number N  =
9 8 7 6 5 4 3 2 1 0
0+8+7+6+5+4+3+2+1+0 = 0 (mod 9)
is divisible by 9.

Number N =
7 0 4 1 2
7+0+4+1+2 = 5
isn't divisible by 9.




Code: PD
P=8 (k=1)
Formulae:
Number N is divisible by 9 iff alternating sum of digits is divisible by 9

Example:Number N =
 7 6 5 4 3 2 1 4
-7+6-5+4-3+2-1+4 = 0
is divisible by 9.

Number N =
6 4 2 7 5 3 2
6-4+2-7+5-3+2 = 1
isn't divisible by 9.