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!)
 A215747 a(n) = (-2)^n mod n. 3
 0, 0, 1, 0, 3, 4, 5, 0, 1, 4, 9, 4, 11, 4, 7, 0, 15, 10, 17, 16, 13, 4, 21, 16, 18, 4, 1, 16, 27, 4, 29, 0, 25, 4, 17, 28, 35, 4, 31, 16, 39, 22, 41, 16, 28, 4, 45, 16, 19, 24, 43, 16, 51, 28, 12, 32, 49, 4, 57, 16, 59, 4, 55, 0, 33, 64, 65, 16, 61, 44, 69, 64, 71, 4, 7 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 COMMENTS n^(n+2) mod (n+2) is essentially the same. Indices of 0's: 2^k - 1, k>=0. Indices of 1's: A006521 except the first term. Indices of 3's: A015940. Indices of 5's: 7, 133, 1517, 11761, ... a(A000040(n)) = A000040(n)-2 = A040976(n). LINKS Alois P. Heinz, Table of n, a(n) for n = 1..10000 EXAMPLE a(5) = (-2)^5 mod 5 = -32 mod 5 = 3. MAPLE a:= n-> (-2)&^n mod n: seq(a(n), n=1..100);  # Alois P. Heinz, Apr 08 2015 PROG (Python) for n in range(1, 333):     print((-2)**n % n, end=', ') CROSSREFS Cf. A015910, A082493, A082494, A110146, A213381. Sequence in context: A100649 A158962 A263824 * A246667 A199066 A306584 Adjacent sequences:  A215744 A215745 A215746 * A215748 A215749 A215750 KEYWORD nonn,look AUTHOR Alex Ratushnyak, Aug 23 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 6 00:46 EDT 2021. Contains 346493 sequences. (Running on oeis4.)