# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a112046 Showing 1-1 of 1 %I A112046 #23 Mar 10 2021 17:29:11 %S A112046 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, %T A112046 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, %U A112046 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 %N 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). %C A112046 If we instead list the least k >= 1, for which Jacobi symbol J(k,2n+1) is 0, we get A090368. %C A112046 It is easy to see that every term is prime. Because the Jacobi symbol is multiplicative as J(ab,m) = J(a,m)*J(b,m) and if for every index i>=1 and < x, J(i,m)=1, then if J(x,m) is 0 or -1, x cannot be composite (say y*z, with both y and z less than x), as then either J(y,m) or J(z,m) would be non-one, which contradicts our assumption that x is the first index where non-one value appears. Thus x must be prime. %H A112046 Indranil Ghosh and A.H.M. Smeets, Table of n, a(n) for n = 1..20000 (first 1000 terms from Indranil Ghosh) %F A112046 a(n) = A112050(n) + 1 = A000040(A112049(n)). %o A112046 (PARI) A112046(n) = for(i=1, (2*n), if((kronecker(i, (n+n+1)) < 1), return(i))); \\ _Antti Karttunen_, May 26 2017 %o A112046 (Python) %o A112046 from sympy import jacobi_symbol as J %o A112046 def a(n): %o A112046 i=1 %o A112046 while True: %o A112046 if J(i, 2*n + 1)!=1: return i %o A112046 else: i+=1 %o A112046 print([a(n) for n in range(1, 103)]) # _Indranil Ghosh_, May 11 2017 %Y A112046 One more than A112050. %Y A112046 Bisections: A112047, A112048, and their difference: A112053. %Y A112046 Cf. A000040, A053760, A053761, A090368, A112049, A112060, A112070, A268829, A286465, A286466. %K A112046 nonn %O A112046 1,1 %A A112046 _Antti Karttunen_, Aug 27 2005 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE