login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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