#math trivia for #May10: #131 is a prime, 13 is a prime, and 31 is a prime. For what other day-numbers xyz are xyz, xy and yz all prime?
Answer: This is a good pattern matching problem. The shortest approach is probably to look at prime xy values and see which z’s work. We’ll allow the case where x = 0; this is convenient because xyz = yz, so only one additional prime test is needed if y is prime.
- 02: 023, 029
- 03: 031, 037
- 05: 053, 059
- 07: 071, 073, 079
- 11: 113
- 13: 131, 137
- 17: 173, 179
- 19: 197
- 23: 237
- 29: none
- 31: 311, 313, 317