Puzzle  RPL and others

04282021, 02:33 AM
Post: #16




RE: Puzzle  RPL and others
(04272021 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 = Σ(d_{k} * n^{k}, k = 0 to n1) x (mod n1) ≡ Σ(d_{k} * 1^{k}, k = 0 to n1) ≡ Σ(d_{k}, k = 0 to n1) This explained the shortcut for mod 9 by adding digits, in decimal. With all digits distinct: x (mod n1) ≡ n*(n1)/2 q*(n1) + r = n*(n1)/2 We restrict q as integer, such that 0 ≤ r < n1 With this setup, x divisible by (n1) is same as test for r = 0. If n is even, q*(n1) + r = (n/2) * (n1) + 0 ⇒ r = 0 If n is odd, q*(n1) + r = (n1)/2 * (n1) + (n1)/2 ⇒ r = (n1)/2 ≠ 0 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)