This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A134323 a(n) = Legendre(-3, prime(n)). 9
 -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Value of lowest trit of prime(n) in balanced ternary representation (original definition). a(n) != 0 for n != 2; a(A049084(A003627(n))) = -1; a(A049084(A002476(n))) = +1. For p = prime(n) != 3, a(n) = +1 if p is of the form 3*k + 1, and -1 if the p is of the form 3*k - 1. - Joerg Arndt, Sep 16 2014 REFERENCES Donald E. Knuth, The Art of Computer Programming, Addison-Wesley, Reading, MA, Vol 2, pp 173-175. LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 Wikipedia, Balanced Ternary FORMULA -1 if the n-th prime is 2 or == 5 mod 6, +1 if the n-th prime is == 1 mod 6, and 0 if it is 3. a(n) = (1 - 0^A039701(n)) * (-1)^(A039701(n)+1). EXAMPLE The twentieth prime is 71, and we verify that -3 is not a quadratic residue modulo 71, hence a(20) = -1. Also, we see that the balanced ternary representation of 71 is {1, 0, -1, 0, -1}, given that 1 * 3^4 + 0 * 3^3 - 1 * 3^2 + 0 * 3^1 - 1 * 3^0 = 71. The twenty-first prime is 73, and we see that x^2 = -3 mod 73 has solutions like x = 17, 56, hence a(21) = 1. Also, the balanced ternary representation of 73 is {1, 0 -1, 0, 1}, as 1 * 3^4 + 0 * 3^3 - 1 * 3^2 + 0 * 3^1 + 1 * 3^0 = 73. MATHEMATICA A134323[n_] := (r = Mod[Prime[n], 6]; If[r == 1, 1, -1]); A134323[1] = -1; A134323[2] = 0; Table[A134323[n], {n, 1, 102}] (* Jean-François Alcover, Nov 07 2011, after Bill McEachen *) JacobiSymbol[-3, Prime[Range[100]]] (* Alonso del Arte, Aug 02 2017 *) PROG (Haskell) a134323 n = (1 - 0 ^ m) * (-1) ^ (m + 1) where m = a000040 n `mod` 3 -- Reinhard Zumkeller, Sep 16 2014 (PARI) apply(p->kronecker(-3, p), primes(100)) \\ Charles R Greathouse IV, Aug 14 2017 CROSSREFS Cf. A000040, A039701, A003627, A002476, A049084, A112632 (partial sums), A070750, A257834. Sequence in context: A131695 A324113 A105812 * A060576 A261012 A019590 Adjacent sequences:  A134320 A134321 A134322 * A134324 A134325 A134326 KEYWORD sign,easy AUTHOR Reinhard Zumkeller, Oct 21 2007 EXTENSIONS Wording of definition changed by N. J. A. Sloane, Jun 21 2015 Name simplified by Alonso del Arte, Aug 02 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 October 21 08:47 EDT 2019. Contains 328292 sequences. (Running on oeis4.)