Browse · MathNet
PrintXVIII-th Macedonian mathematical Olympiad
North Macedonia number theory
Problem
Find all natural numbers for which each natural number having digits '1' and one digit '7' in its decimal representation is prime.
Solution
A number having digits '1' and one digit '7' in decimal representation is of the form where is a number having digits '1', and . Notice that if then the sum of the digits of is . Notice that Let . Then where , . Then If then , so therefore we saw that is not prime in any case. Suppose does not divide . Then we saw that and additionally is not congruent to modulo . Put . For this , from the above it follows that we can choose , , such that . So this is divisible by . For we saw that the numbers are composite. We need to check all cases . For For , . In the case we already saw that all numbers are composite. For and all numbers are prime.
Final answer
n = 1 and n = 2
Techniques
Prime numbersFactorization techniquesMultiplicative order