login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039701 a(n) = n-th prime modulo 3. 23
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; 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 (spados(AT)katamail.com), May 03 2002; corrected and simplified by Dean Hickerson (dean.hickerson(AT)yahoo.com), 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 (noe(AT)sspectra.com), 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 (reinhard.zumkeller(AT)gmail.com), 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, 10000}]

CROSSREFS

Cf. A039702 - A039706, A038194, A007652, A039709 - A039715.

Sequence in context: A178687 A117929 A107455 * A025822 A051585 A049115

Adjacent sequences:  A039698 A039699 A039700 * A039702 A039703 A039704

KEYWORD

nonn,easy

AUTHOR

Clark Kimberling (ck6(AT)evansville.edu)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 05:45 EST 2012. Contains 205694 sequences.