login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 21
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If we instead list the least k >= 1, for which Jacobi symbol J(k,2n+1) is 0, we get A090368.
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.
LINKS
Indranil Ghosh and A.H.M. Smeets, Table of n, a(n) for n = 1..20000 (first 1000 terms from Indranil Ghosh)
FORMULA
a(n) = A112050(n) + 1 = A000040(A112049(n)).
PROG
(PARI) A112046(n) = for(i=1, (2*n), if((kronecker(i, (n+n+1)) < 1), return(i))); \\ Antti Karttunen, May 26 2017
(Python)
from sympy import jacobi_symbol as J
def a(n):
i=1
while True:
if J(i, 2*n + 1)!=1: return i
else: i+=1
print([a(n) for n in range(1, 103)]) # Indranil Ghosh, May 11 2017
CROSSREFS
One more than A112050.
Bisections: A112047, A112048, and their difference: A112053.
Sequence in context: A130326 A059906 A349196 * A076902 A287271 A290884
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 27 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 14:10 EDT 2024. Contains 371792 sequences. (Running on oeis4.)