login
A226523
a(n) = 0 if p=2, 1 if 2 is a square mod p, -1 otherwise, where p = prime(n).
6
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
OFFSET
1
COMMENTS
This is the Legendre-Jacobi-Kronecker symbol (2/p) where p is the n-th prime.
Appears to be the constant term of the minimal polynomial of cos(Pi/prime(n)). - Ethan Beihl, Oct 27 2016
For n > 1 a(n) is the +-1 value of prime(n) as a near-Wieferich prime, i.e., a(n) is positive or negative depending on whether 2^((p-1)/2) == +1 + A*p (mod p^2) or 2^((p-1)/2) == -1 + A*p (mod p^2) (cf. JeppeSN link). - Felix Fröhlich, Jul 01 2022
LINKS
JeppeSN, Check a WW find with PARI/GP, PrimeGrid forum (Message 145728).
PROG
(PARI) a(n) = kronecker(2, prime(n)) \\ Felix Fröhlich, Jul 01 2022
CROSSREFS
A038871 lists the primes for which a(n)=1, A003629 those for which a(n)=-1.
Sequence in context: A134824 A165476 A165596 * A070238 A062157 A103131
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jun 22 2013
STATUS
approved