This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A290542 a(n) is the least integer k in the interval [2, sqrt(n)] such that k^n == k (mod n), or 0 if no such integer exists. 1
 0, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 4, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 5, 3, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 4, 0, 0, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 4,2 LINKS FORMULA a(A000040(n)) = 2 for n >= 3. a(A001567(n)) = 2 for n >= 1. a(A006935(n)) = 2 for n >= 2. For n >= 3, a(x) = 2*A010051(x), where x = A000040(n). MATHEMATICA Table[SelectFirst[Range[2, Sqrt@ n], PowerMod[#, n , n] == Mod[#, n] &] /. k_ /; MissingQ@ k -> 0, {n, 4, 90}] (* Michael De Vlieger, Aug 09 2017 *) PROG (MAGMA) lst:=[]; for n in [4..90] do r:=Floor(Sqrt(n)); for k in [2..r] do if Modexp(k, n, n) eq k then Append(~lst, k); break; end if; if k eq r then Append(~lst, 0); end if; end for; end for; lst; (PARI) a(n) = for (k=2, sqrtint(n), if (Mod(k, n)^n == k, return(k)); ); return (0); \\ Michel Marcus, Aug 19 2017 CROSSREFS Cf. A010051, A290543. Sequence in context: A069851 A197629 A198255 * A029834 A318715 A202385 Adjacent sequences:  A290539 A290540 A290541 * A290543 A290544 A290545 KEYWORD nonn AUTHOR Arkadiusz Wesolowski, Aug 05 2017 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 December 15 04:23 EST 2019. Contains 329991 sequences. (Running on oeis4.)