24
The totient function \$\phi(n)\$, also called Euler's totient function, is defined as the number of positive integers \$\le n\$ that are relatively prime to (i.e., do not contain any factor in common with) \$n\$, where \$1\$ is counted as being relatively prime to all numbers. (from WolframMathworld)
Challenge
Given an integer \$N > 1\$, output the lowest integer \$M > N\$, where \$\phi(N) = \phi(M)\$. If \$M\$ does not exist, output a non-ambiguous non-positive-integer value to indicate that M does not exist (e.g. 0, -1, some string).
Note that \$\phi(n) \geq \sqrt n\$ for all \$n > 6\$
Examples
Where M exists
15 -> 16 (8)
61 -> 77 (60)
465 -> 482 (240)
945 -> 962 (432)
No M exists
12 (4)
42 (12)
62 (30)
Standard loopholes apply, shortest answer in bytes wins.
1obviously related – Giuseppe – 2019-12-04T20:27:48.867
M for 8 is 10 - both have phi(x) = 4 – Nick Kennedy – 2019-12-04T20:49:55.433
@NickKennedy thanks, missed that – frank – 2019-12-04T20:53:08.007
2Is it permissible to return the input where there is no M? – Nick Kennedy – 2019-12-04T21:13:28.250
@NickKennedy no, the output should not be a positive integer in this case – frank – 2019-12-04T21:15:30.560
4
This is A066659.
– Arnauld – 2019-12-05T01:17:51.253