OFFSET
1,1
COMMENTS
LINKS
EXAMPLE
For a(2), we have:
Conv(2,11) = 9
Conv(3,11) = 9
Conv(4,11) = 4
Conv(5,11) = 1
Conv(6,11) = 5
Conv(7,11) = 2
Conv(8,11) = 3
Conv(9,11) = 5
Conv(10,11) = 1
Therefore, the only solution is Conv(4,11) = 4.
MATHEMATICA
Conv[b_, m_] :=
Which[
Mod[b, m]==0, Return[0],
Mod[b, m]==1, Return[1],
GCD[b, m]==1, Return[PowerMod[b, Conv[b, MultiplicativeOrder[b, m]], m]],
True, Return[PowerMod[b, EulerPhi[m]+Conv[b, EulerPhi[m]], m]]
]
a[m_] := Count[Table[Conv[b, m]==b, {b, 0, m-1}], True]
Table[If[a[i]==3, i, ## &[]], {i, 2, 800}]
PROG
(PARI) conv(b, n) = {if (b % n == 0, return (0)); if (b % n == 1, return (1)); if (gcd(b, n)==1, return (lift(Mod(b, n)^conv(b, lift(znorder(Mod(b, n))))))); lift(Mod(b, n)^(eulerphi(n) + conv(b, eulerphi(n)))); }
isok(m) = sum(b=2, m-1, conv(b, m) == b) == 1; \\ Michel Marcus, Sep 13 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernat Pagès Vives, Sep 06 2021
STATUS
approved