login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A182816 Number of values b in Z/nZ such that b^n = b. 8
1, 2, 3, 2, 5, 4, 7, 2, 3, 4, 11, 4, 13, 4, 9, 2, 17, 4, 19, 4, 9, 4, 23, 4, 5, 4, 3, 8, 29, 8, 31, 2, 9, 4, 9, 4, 37, 4, 9, 4, 41, 8, 43, 4, 15, 4, 47, 4, 7, 4, 9, 8, 53, 4, 9, 4, 9, 4, 59, 8, 61, 4, 9, 2, 25, 24, 67, 4, 9, 16, 71, 4, 73, 4, 9, 8, 9, 8, 79, 4, 3, 4, 83, 8, 25, 4, 9, 4, 89, 8, 49, 4, 9, 4, 9, 4, 97, 4, 9, 4, 101, 8, 103, 4, 45, 4, 107, 4, 109, 8, 9, 8, 113 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) is the number of nonnegative bases b < n such that b^n == b (mod n).
LINKS
FORMULA
a(n) = n for primes A000040 and Carmichael numbers A002997.
a(n) = Product_{i=1..m} (1 + gcd(n-1, p_i-1)), where p_1, p_2, ..., p_m are all distinct primes dividing n. - Max Alekseyev, Dec 06 2010
a(p^k) = p for prime p with k > 0. - Thomas Ordowski, Sep 05 2018
MAPLE
f:= n -> mul(1+igcd(n-1, p[1]-1), p = ifactors(n)[2]):
map(f, [$1..200]); # Robert Israel, Sep 05 2018
MATHEMATICA
Table[Times @@ Map[(1 + GCD[n - 1, # - 1]) &, FactorInteger[n][[All, 1]] ], {n, 113}] (* Michael De Vlieger, Sep 01 2020 *)
PROG
(PARI) A182816(n)=sum(a=1, n, Mod(a, n)^n==a);
(PARI) { A182816(n) = my(p=factor(n)[, 1]); prod(j=1, #p, 1+gcd(n-1, p[j]-1)); } \\ Max Alekseyev, Dec 06 2010
CROSSREFS
Cf. A063994.
Sequence in context: A127433 A055573 A238729 * A367580 A195637 A181861
KEYWORD
nonn
AUTHOR
M. F. Hasler, Dec 05 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 08:32 EDT 2024. Contains 372207 sequences. (Running on oeis4.)