This site is supported by donations to The OEIS Foundation.

 Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS". Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A039701 a(n) = n-th prime modulo 3. 26
 2, 0, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS If n > 2 and prime(n) is a Mersenne prime then a(n) = 1. Proof: prime(n) = 2^p - 1 for some odd prime p, so prime(n) = 2*4^((p-1)/2) - 1 == 2 - 1 = 1 (mod 3). - Santi Spadaro, May 03 2002; corrected and simplified by Dean Hickerson, Apr 20 2003 Except for n = 2, a(n) is the smallest number k > 0 such that 3 divides prime(n)^k - 1. - T. D. Noe, Apr 17 2003 a(n) <> 0 for n <> 2; a(A049084(A003627(n))) = 2; a(A049084(A002476(n))) = 1; A134323(n) = (1 - 0^a(n)) * (-1)^(a(n)+1). - Reinhard Zumkeller, Oct 21 2007 LINKS Nathaniel Johnston, Table of n, a(n) for n = 1..10000 MAPLE seq(ithprime(n) mod 3, n=1..105); # Nathaniel Johnston, Jun 29 2011 MATHEMATICA Table[Mod[Prime[n], 3], {n, 100}] PROG (Haskell) a039701 = (`mod` 3) . a000040 a039701_list = map (`mod` 3) a000040_list -- Reinhard Zumkeller, Nov 16 2012 (MAGMA) [p mod(3): p in PrimesUpTo(500)]; // Vincenzo Librandi, May 06 2014 (PARI) primes(100)%3 \\ Charles R Greathouse IV, May 06 2014 CROSSREFS Cf. A039702-A039706, A038194, A007652, A039709-A039715, A185934, A217659. Sequence in context: A238417 A117929 A107455 * A025822 A051585 A049115 Adjacent sequences:  A039698 A039699 A039700 * A039702 A039703 A039704 KEYWORD nonn,easy AUTHOR 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.