OFFSET
1,1
COMMENTS
These are all divisible by 6, as J(2,m) = +1 if m = 1 or 7 mod 8 and -1 if m = 3 or 5 mod 8 and J(3,m) = +1 if m = 1 or 11 mod 12, -1 if m = 5 or 7 mod 12 and 0 if m = 3 or 9 mod 12 (where Jacobi symbol J(i,m) returns +1 if i is quadratic residue modulo odd number m), it follows that only when i=24*n it holds that J(2,i-1)=J(2,i+1)=J(3,i-1)=J(3,i+1)=+1 and thus only then the function A112046 (and A112053) depends on values of J(k>3,m).
MATHEMATICA
a112046[n_]:=Block[{i=1}, While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; Select[Range[1000], a112046[2#] - a112046[2# - 1] != 0 &] (* 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([n 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