OFFSET
2,1
COMMENTS
Writing n = m^(2k), a(n) >= 2^A001221(n) + m^k - 1.
Writing n = m^(2k+1), a(n) >= 2^A001221(n) + m^k - 1.
If n is in A101793, then a(n) = 3.
It appears that a(n) = 2 only for n = 2, 3, 5.
It appears that a(n) = 3 only for n = 4, 11, 13, 19 and for n in A101793.
It is not known whether there exist infinitely many numbers n satisfying a(n) = 3.
LINKS
EXAMPLE
For n = 100, pick b = 3.
3^^1 == 3 (mod 100)
3^^2 == 27 (mod 100)
3^^3 == 87 (mod 100)
3^^4 == 87 (mod 100)
3^^5 == 87 (mod 100)
...
It can be proved that the sequence converges to 87, so Conv(3,100) = 87. Since b = 3 does not satisfy Conv(b,100) = b, this value is not counted in a(100).
For n = 7, pick b = 2.
2^^1 == 2 (mod 7)
2^^2 == 4 (mod 7)
2^^3 == 2 (mod 7)
2^^4 == 2 (mod 7)
2^^5 == 2 (mod 7)
...
It can be proved that the sequence converges to 2, so Conv(2,7) = 2. Thus, 2 is a solution for a(7). The other 3 solutions are 0, 1 and 4 giving a total of a(7) = 4 solutions.
MATHEMATICA
Conv[b_, n_] :=
Which[
Mod[b, n]==0, Return[0],
Mod[b, n]==1, Return[1],
GCD[b, n]==1, Return[PowerMod[b, Conv[b, MultiplicativeOrder[b, n]], n]],
True, Return[PowerMod[b, EulerPhi[n]+Conv[b, EulerPhi[n]], n]]
]
a[n_] := Count[Table[Conv[b, n]==b, {b, 0, n-1}], True]
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)))); }
a(n) = sum(b=0, n-1, conv(b, n) == b); \\ Michel Marcus, Sep 13 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernat Pagès Vives, Sep 06 2021
STATUS
approved