DMOPC '21 Contest 10 P5 - Number Theory

View as PDF

Submit solution


Points: 20 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem types

Find an odd integer n with 1<n<1018 such that d(φ(n))=φ(d(n)).

For any positive integer m,

  • φ(m) is the number of integers between 1 and m inclusive that are coprime to m.
  • d(m) is the number of positive divisors of m.

Input Specification

There is no input for this problem.

Output Specification

Output n.

Scoring

If your output is improperly formatted, n is even, or n does not satisfy 1<n<1018 and d(φ(n))=φ(d(n)), you will receive 0 points.

Otherwise, your score will be min(5(37log4(n)),100). For full points, n must be less than 417.

Sample Output

Copy
6

Explanation

Note that d(φ(6))=d(2)=2 and φ(d(6))=φ(4)=2, so this value of n satisfies d(φ(n))=φ(d(n)).

Unfortunately, this value of n is not odd, so it would score 0 points.


Comments

There are no comments at the moment.