A377380 a(n) is the first positive number k such that k is alternately a quadratic residue and nonresidue modulo the first n primes, but not the n+1'th.
1, 2, 11, 41, 26, 5, 671, 89, 59, 1181, 1991, 3755, 21521, 34145, 25994, 137885, 61106, 1503029, 2617439, 1008551, 2897081, 22363295, 33603926, 36518450, 79865294, 185914490, 593068985, 2211452939, 2120224529, 1673286179, 2644173521, 1976870465
Offset: 1
Keywords
Examples
a(3) = 11 because 11 is a quadratic residue mod 2, a nonresidue mod 3, a residue mod 5, but a residue mod 7, and no smaller number works.
Programs
-
Maple
with(numtheory): N:= 20: V:= Vector(N): V[1]:= 1: count:= 1: for x from 2 by 3 while count < N do p:= 1: for m from 0 do p:= nextprime(p); if numtheory:-quadres(x,p) <> (-1)^m then break fi; od; if V[m] = 0 then V[m]:= x; count:= count+1; fi od: convert(V,list);
Comments