Post Reply 
[VA] Short & Sweet Math Challenge #25 "San Valentin's Special: Weird Math"
02-17-2021, 08:44 PM
Post: #12
RE: [VA] Short & Sweet Math Challenge #25 "San Valentin's Special: Weird Math...
For challenge five, which I have finished, it does not seem possible to implement efficient sets on the HP PRIME because lists are limited to only 20K elements. There is no bitvector or efficient set type that we can use.

Because of this limitation I rewrote the program in C (sorry for Cheating...). With this I found:

perfect 294001
perfect 505447
perfect 584141
perfect 604171
perfect 971767

Note that the program checks for PP by changing one digit of a prime at a time to check if that number is prime or not. This includes changing the leading digit to any digit 0 to 9, including 0. So for example, 199 -> 099 is not PP. It seems odd to me to change the leading digit to 0 to check for PP.

I updated my post with EDITs to add my answer as well as make a correction to the weird sum (I misread k-1).

- Rob

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [VA] Short & Sweet Math Challenge #25 "San Valentin's Special: Weird Math... - robve - 02-17-2021 08:44 PM



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