Puzzle - RPL and others
|
04-28-2021, 02:33 AM
Post: #16
|
|||
|
|||
RE: Puzzle - RPL and others
(04-27-2021 08:16 PM)3298 Wrote: Interesting to note: odd bases never have solutions... We can let the number be x, with digits 1 to n, all distinct, in base n, integer n > 1: x = Σ(dk * nk, k = 0 to n-1) x (mod n-1) ≡ Σ(dk * 1k, k = 0 to n-1) ≡ Σ(dk, k = 0 to n-1) This explained the shortcut for mod 9 by adding digits, in decimal. With all digits distinct: x (mod n-1) ≡ n*(n-1)/2 q*(n-1) + r = n*(n-1)/2 We restrict q as integer, such that 0 ≤ r < n-1 With this setup, x divisible by (n-1) is same as test for r = 0. If n is even, q*(n-1) + r = (n/2) * (n-1) + 0 ⇒ r = 0 If n is odd, q*(n-1) + r = (n-1)/2 * (n-1) + (n-1)/2 ⇒ r = (n-1)/2 ≠ 0 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)