[seqfan] A closed-form expression

Tomasz Ordowski tomaszordowski at gmail.com
Wed Sep 5 09:29:14 CEST 2018


Dear SeqFans!

Let a(n) = number of bases b < n such that b^n == b (mod n).

1, 2, 3, 2, 5, 3, 7, 2, 3, 4, 11, 4, 13, 3, 9, 2, 17, 3, 19, 5, 9, ...

For n = 6; 0^6 == 0 (mod 6), 1^6 == 1 (mod 6), and 3^6 == 3 (mod 6).

Note that, for n > 1, a(n) = n if and only if n is a prime or a Carmichael
number.

For n > 1, a(n) > A063994(n) = number of bases b mod n for which b^(n-1) ==
1 (mod n).

Is there any formula for a(n) similar to https://oeis.org/A063994 ?

Best regards,

Thomas



More information about the SeqFan mailing list