Puzzle - RPL and others
|
05-04-2021, 03:29 AM
Post: #25
|
|||
|
|||
RE: Puzzle - RPL and others
(05-03-2021 03:43 PM)3298 Wrote: ... a staggering 1304_s (over 21 minutes!) for base 22, which does not benefit from it at all beyond There is also a mod-4 bucket, for even base n: n = 4k: d4 ≡ d8 ≡ ... ≡ d4k ≡ 0 (mod 4) → d2 ≡ d6 ≡ ... ≡ d4k-2 ≡ 2 (mod 4) n = 4k+2: d4 ≡ d8 ≡ ... ≡ d4k ≡ 2 (mod 4) → d2 ≡ d6 ≡ ... ≡ d4k+2 ≡ 0 (mod 4) Combined, we have the invariant: (n + 2i + d2i) ≡ 0 (mod 4) Code: def recurse3(lst, n, k=1, x=0): >>> recurse3(range(10), 10) 381654729 With this, I confirmed there is no solution for 16 ≤ n ≤ 40 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)