The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A065295 Number of values of s, 0 < s <= n-1, such that s^s == s (mod n). 6
 0, 1, 1, 2, 1, 4, 2, 4, 3, 4, 1, 7, 2, 5, 7, 6, 3, 8, 2, 9, 7, 5, 2, 13, 5, 8, 3, 11, 2, 14, 3, 6, 8, 8, 9, 13, 2, 7, 9, 17, 5, 18, 3, 11, 13, 5, 2, 19, 9, 12, 11, 13, 1, 8, 11, 18, 9, 7, 1, 27, 4, 7, 20, 10, 16, 18, 3, 13, 8, 21, 2, 23, 5, 6, 16, 14, 13, 23, 4, 27, 9, 11, 1, 31, 13, 10, 12, 20 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS Note that a(1) = 0 by definition. - Harry J. Smith, Oct 15 2009 LINKS Harry J. Smith and T. D. Noe, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith) EXAMPLE For n=5 we have (1^1) mod 5 = 1, (2^2) mod 5 = 4, (3^3) mod 5 = 2, (4^4) mod 5 = 1. Only for s=1 does (s^s) mod 5=s, so a(5)=1 MATHEMATICA f[p_] := Module[{x = Range[p-1]}, Count[PowerMod[x, x, p] - x, 0]]; Table[f[n], {n, 100}] (* T. D. Noe, Feb 19 2014 *) PROG (PARI) { for (n=1, 1000, a=0; for (s=1, n - 1, if (s^s % n == s, a++)); if (n==1, a=0); write("b065295.txt", n, " ", a) ) } [Harry J. Smith, Oct 15 2009] CROSSREFS Cf. A065296. Sequence in context: A321088 A070556 A277687 * A296604 A261211 A233521 Adjacent sequences:  A065292 A065293 A065294 * A065296 A065297 A065298 KEYWORD nonn AUTHOR Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 28 2001 EXTENSIONS Definition revised by N. J. A. Sloane, Oct 15 2009. STATUS approved

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

Last modified September 25 12:45 EDT 2020. Contains 337344 sequences. (Running on oeis4.)