I am a prime number less than 40. The sum of my digits is 8. Who am I?
The only counting numbers less than 40 with sum of digits 8 are
35, 26, and 17.
35 has factors 1, 5, 7, and 35 so it's not prime
26 has factors 1, 2, 13, and 26 so it's not prime.
17 has factors 1 and 17, so it's prime, since it
has exactly 2 factors no more and no less.
Answer 17.
Edwin