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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A213381 a(n) = n^n mod (n+2). 6
 1, 1, 0, 2, 4, 3, 0, 7, 6, 5, 4, 6, 8, 13, 0, 8, 16, 9, 4, 19, 12, 11, 16, 17, 14, 7, 4, 14, 16, 15, 0, 31, 18, 13, 16, 18, 20, 37, 24, 20, 16, 21, 4, 7, 24, 23, 16, 17, 6, 49, 4, 26, 34, 3, 8, 55, 30, 29, 4, 30, 32, 61, 0, 57, 16, 33, 4, 67, 46, 35, 16, 36, 38 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS Conjectures: 1. Indices of zeros: 2^(x+2)-2, x >= 0. 2. a(n)=n if n is in A176003. 3. Every integer k >= 0 appears in a(n) at least once. 4. Every k >= 0 appears in a(n) infinitely many times. From Robert Israel, May 05 2015: (Start) Conjecture 1) is true: with m = n+2, a(n) = (-2)^(m-2) mod m = 0 iff m divides 2^(m-2), i.e., m = 2^k for some k with k <= m-2 (which is true for k >= 2). Conjecture 2) is true: if n = 3*p-2 where p is prime, then n == 1 (mod 3) so n^n == n (mod 3), and n^(p-1) == 1 (mod p) so n^n == n (mod p), and therefore (if p <> 3) n^n == n (mod 3*p). A separate computation verifies the case p=3. If p is an odd prime, then a(p+2) = (p-1)/2. (End) LINKS Paolo P. Lava, Table of n, a(n) for n = 0..1000 FORMULA a(n) = (n^n) mod (n+2). a(n) = (-2)^n mod (n+2). - Robert Israel, May 05 2015 EXAMPLE a(5) = 5^5 mod 7 = 3125 mod 7 = 3. MAPLE List213381:=proc(q) local a, n; print(1); for n from 1 to q do print(n^n mod (n+2)); od; end: List213381(1000); # Paolo P. Lava, Apr 10 2013 MATHEMATICA a[n_] := PowerMod[-2, n, n+2]; a /@ Range[0, 100] (* Jean-François Alcover, Jun 04 2020 *) PROG (Python) print([n**n % (n+2) for n in range(99)]) (PARI) a(n) = lift(Mod(n, n+2)^n); \\ Michel Marcus, Jun 04 2020 CROSSREFS Cf. A000312. Sequence in context: A048644 A246713 A106137 * A127651 A019641 A085008 Adjacent sequences: A213378 A213379 A213380 * A213382 A213383 A213384 KEYWORD nonn AUTHOR Alex Ratushnyak, Jun 10 2012 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.

Last modified December 4 20:32 EST 2022. Contains 358570 sequences. (Running on oeis4.)