Post Reply 
[VA] Short & Sweet Math Challenge #25 "San Valentin's Special: Weird Math"
02-25-2021, 09:29 PM
Post: #34
RE: [VA] Short & Sweet Math Challenge #25 "San Valentin's Special: Weird Math...
Challenge 5 - Perfect Primes.

I am clearly not understanding the challenge. Here is what I at first thought it meant:
Quote:A perfect prime is a prime where there is no way you can make it composite by changing one digit (and one digit only) into any other digit.

So the brute force procedure to finding a perfect prime would be
1) Find a prime
2) Take the first digit of the prime
3) change it to all the numbers 0-9 in sequence
4) check each time if the resulting number is a prime number
5) proceed with 2) - 4) for all digits of the prime.
6) if none of the above creates a composite, you have a perfect prime.

Given that all numbers with a sum of the digits divisible by 3 are composite, it seems to me that the above test would always fail, as one could always change one digit up or down enough to make the sum of digits divisible by 3 and hence the number divisible by 3.

Would be great if someone could help me understand what I am missing (which I am sure is blatantly obvious)

Cheers,

PeterP
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... - PeterP - 02-25-2021 09:29 PM



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