Given positive integers N, x and b, is N divisible by x in the base b ?
Suppose that
|
|
|
|
|
|
|
To implement this algorithm on a spreadsheet, the given coefficients ak are listed on the first row. In this example the integer to be tested is
|
|
2
|
4
|
7
|
8
|
2
|
9
|
1
|
4
|
8
|
6
|
3
|
7
|
5
|
1
|
3
|
4
|
|
|
17
|
||||||||||||||||
|
23
|
||||||||||||||||
|
6
|
3
|
9
|
10
|
13
|
5
|
15
|
11
|
16
|
14
|
8
|
7
|
4
|
12
|
2
|
6
|
1
|
|
15
|
9
|
7
|
5
|
3
|
10
|
11
|
0
|
4
|
11
|
14
|
10
|
16
|
7
|
5
|
4
|