|
|
A134323
|
|
a(n) = Legendre(-3, prime(n)).
|
|
10
|
|
|
-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 (A059095) (original definition).
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
|
|
LINKS
|
|
|
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) != 0 for n != 2;
|
|
EXAMPLE
|
For n=20, prime(20) = 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 row A059095(71) = {1, 0, -1, 0, -1} which ends in -1.
For n=21, prime(21) = 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 row A059095(73) = {1, 0 -1, 0, 1} which ends in 1.
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a134323 n = (1 - 0 ^ m) * (-1) ^ (m + 1) where m = a000040 n `mod` 3
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|