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.
%I A112050 #19 May 09 2021 04:59:28 %S A112050 1,1,2,2,1,1,2,2,1,1,4,4,1,1,2,2,1,1,2,2,1,1,4,6,1,1,2,2,1,1,2,2,1,1, %T A112050 6,4,1,1,2,2,1,1,2,2,1,1,4,4,1,1,2,2,1,1,2,2,1,1,6,10,1,1,2,2,1,1,2,2, %U A112050 1,1,4,4,1,1,2,2,1,1,2,2,1,1,4,12,1,1,2,2,1,1,2,2,1,1,6,4,1,1,2,2,1,1 %N A112050 Length of the longest prefix of 1's in the Jacobi-vector {J(2n+1,1),J(2n+1,2),...,J(2n+1,2n)}. %F A112050 a(n) = A112046(n) - 1. %t A112050 a112046[n_]:=Block[{i=1}, While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; Table[a112046[n] - 1, {n, 102}] (* _Indranil Ghosh_, May 24 2017 *) %o A112050 (Python) %o A112050 from sympy import jacobi_symbol as J %o A112050 def a112046(n): %o A112050 i=1 %o A112050 while True: %o A112050 if J(i, 2*n + 1)!=1: return i %o A112050 else: i+=1 %o A112050 def a(n): return a112046(n) - 1 %o A112050 print([a(n) for n in range(1, 103)]) # _Indranil Ghosh_, May 24 2017 %Y A112050 Cf. A112046. %K A112050 nonn %O A112050 1,3 %A A112050 _Antti Karttunen_, Aug 27 2005 %E A112050 Name clarified by _Joerg Arndt_, May 24 2017