cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A112056 Odd numbers of the form 4n-1 for which Jacobi-first-non-one(4n-1) differs from Jacobi-first-non-one(4n+1).

This page as a plain text file.
%I A112056 #11 May 07 2021 00:46:32
%S A112056 47,71,119,167,191,287,311,359,407,431,479,527,551,647,671,719,767,
%T A112056 791,839,887,911,959,1007,1031,1127,1151,1199,1247,1271,1319,1367,
%U A112056 1391,1487,1511,1559,1607,1631,1679,1727,1751,1799,1847,1871,1967
%N A112056 Odd numbers of the form 4n-1 for which Jacobi-first-non-one(4n-1) differs from Jacobi-first-non-one(4n+1).
%C A112056 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).
%F A112056 a(n) = 4*A112054(n)-1.
%F A112056 a(n) = A112057(n)-2 = A112058(n)-1.
%t A112056 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 *)
%o A112056 (Python)
%o A112056 from sympy import jacobi_symbol as J
%o A112056 def a112046(n):
%o A112056     i=1
%o A112056     while True:
%o A112056         if J(i, 2*n + 1)!=1: return i
%o A112056         else: i+=1
%o A112056 def a(n): return a112046(2*n) - a112046(2*n - 1)
%o A112056 print([4*n - 1 for n in range(1, 1001) if a(n)!=0]) # _Indranil Ghosh_, May 24 2017
%Y A112056 Cf. A112054, A112057, A112058.
%K A112056 nonn
%O A112056 1,1
%A A112056 _Antti Karttunen_, Aug 27 2005