OFFSET
1,1
COMMENTS
Maple calls K(k,p) the Legendre symbol.
The old entry with this sequence number was a duplicate of A024356.
REFERENCES
H. Cohen, A Course in Computational Number Theory, Springer, 1996 (p. 28 defines the Kronecker-Jacobi symbol).
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MAPLE
with(numtheory); f:=proc(n) local M, i, j, k; M:=100000; for i from 1 to M do if legendre(n, ithprime(i)) = -1 then RETURN(ithprime(i)); fi; od; -1; end;
PROG
(PARI) a(n)=my(k=n+(sqrtint(4*n)+1)\2); forprime(p=2, , if(kronecker(k, p)<0, return(p))) \\ Charles R Greathouse IV, Aug 28 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 16 2008, Oct 17 2008. Definition corrected Dec 03 2008.
STATUS
approved