OFFSET
1,1
COMMENTS
Here Jacobi-first-non-one(m) (for odd numbers m) is defined as the first value of i >= 1, for which Jacobi symbol J(i,m) is not +1 (i.e. is either 0 or -1).
MATHEMATICA
a112046[n_]:=Block[{i=1}, While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; 4*Select[Range[1000], a112046[2#] - a112046[2# - 1] != 0 &] - 1 (* Indranil Ghosh, May 24 2017 *)
PROG
(Python)
from sympy import jacobi_symbol as J
def a112046(n):
i=1
while True:
if J(i, 2*n + 1)!=1: return i
else: i+=1
def a(n): return a112046(2*n) - a112046(2*n - 1)
print([4*n - 1 for n in range(1, 1001) if a(n)!=0]) # Indranil Ghosh, May 24 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 27 2005
STATUS
approved