Consecutive Primes

Computer Science Level 3

Define \(\text{sum}(N)\) which returns the sum of digits of a number.

Find the smallest pair of consecutive primes \(a\) and \(b\) which such that \(\text{sum}(a) = \text{sum}(b)\). Enter your answer as \(a + b\).

Details and Assumptions:

  • Consecutive prime numbers refers to a sequence of two prime numbers which don't have any prime number between them. For example: 2 and 3 are consecutive primes, 37 and 41 are consecutive primes.

  • As an explicit example: \(\text{sum}(37) \neq \text{sum}(41) \) because \(3+7\neq 4+1\). So 37 and 41 are not such numbers.


Problem Loading...

Note Loading...

Set Loading...