2023 RPN HHC Programming Contest
|
10-09-2023, 01:24 PM
Post: #45
|
|||
|
|||
RE: 2023 RPN HHC Programming Contest
(10-09-2023 03:10 AM)Gerson W. Barbosa Wrote: Anyway, it’s difficult to do it in 12 steps using this approach (an approximation for 41 or 71, the other obtained through the 30 units difference). Congratulations for managing to save two steps in your previous code! Thank you for the byte counts and for your nice solution! It's always interesting to see what others had come up with! One of my early approaches was based on accumulating statistical registers and the similarity of congruence: \( 71 = 6(6+5)+5 \) and \( 41 = 6*6+5 \) or something similar with \( {71,41} \equiv 11 \mod 15 \) although the plain 41C does not have an easy way to recall the STAT x,x^2, y, y^2 registers without using RCL 11 or RCL 12 number keys. I came to the conclusion there were too many steps to get that many 6, 5, and 11's on the stack! I also looked for some quick calculations that would let me poke the x,y stat registers to find a distribution that also had a MEAN or STDEV approximately 41 or 71, but this was also much harder starting from a empty stack. I also respect Thomas's clever solution based on OEIS A254308! I have several python tools that can search for those kinds of sequences based on the downloaded full list, but didn't think to search there, very nice idea! OEIS: # OEIS Sequence Data (http://oeis.org/stripped.gz) There are 198+ sequences that have 41 and 71 as consecutive entries. Some interesting ( perhaps impractical) entries: A002327 is also interesting as it allows \( a(n) = n^2-n-1 \) for \( x = {7,9} \) A125202 \( a(n) = 4n^2 - 6n + 1 \) (similar to the ulam spiral generating functions!) A064999 \(a(n) = \frac {n^3 + 3*n^2 + 2*n + 3} {3}\) - for obvious reasons this is impractical in a short program, but since it relies on \( a(4) \) and \( a(5) \) it is an interesting application of 1 to 5. A260805 \( p = q^2 - 2*r^2 \) evaluated at \( (7,2) \) \( (11,5) \) Gene, Thank you very much for the interesting challenge!! Would love to see the conference results! 17bii | 32s | 32sii | 41c | 41cv | 41cx | 42s | 48g | 48g+ | 48gx | 50g | 30b |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)