A112046 a(n) = the least k >= 1 for which the Jacobi symbol J(k,2n+1) is not +1 (thus is either 0 or -1).
2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 7, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 11, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 13, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 5, 2, 2, 3, 3, 2, 2
Offset: 1
Keywords
Links
- Indranil Ghosh and A.H.M. Smeets, Table of n, a(n) for n = 1..20000 (first 1000 terms from Indranil Ghosh)
Crossrefs
Programs
-
PARI
A112046(n) = for(i=1, (2*n), if((kronecker(i, (n+n+1)) < 1), return(i))); \\ Antti Karttunen, May 26 2017
-
Python
from sympy import jacobi_symbol as J def a(n): i=1 while True: if J(i, 2*n + 1)!=1: return i else: i+=1 print([a(n) for n in range(1, 103)]) # Indranil Ghosh, May 11 2017
Comments