A385051 a(n) is the least positive number k such that n is the greatest m such that k is a quadratic nonresidue mod prime(i+1) for i=1..m and {k mod prime(i+1): i=1..m} are all distinct.
1, 2, 8, 68, 173, 593, 1748, 908, 40178, 74093, 91538, 93308, 441803, 10712063, 7898483, 35865968, 133019963, 206951093, 1314259253, 2453647853, 6701493818, 54776939873, 7717930358, 250589717363, 255937042268, 3665861003153, 957987212453, 9953155219223
Offset: 0
Keywords
Examples
a(0) = 1: |{}| = 0: terminates at 1 mod 3 (square: = 1^2 mod 3). a(1) = 2: |{2}| = 1: 2 mod 3 = 2 (nonsquare), terminates at 2 mod 5 (not distinct: repeats 2 mod 3). a(2) = 8: |{2, 3}| = 2: 8 mod 3 = 2 (nonsquare), 8 mod 5 = 3 (nonsquare), terminates at 8 mod 7 (square: = 1^2 mod 7). a(3) = 68: |{2, 3, 5}| = 3.
Crossrefs
Programs
-
PARI
a(n)={my(v=List); for(k=1, oo, my(m=Map); for(i=1, oo, my(p=prime(i+1), kp=k%p); if(i>#v, listput(v, Map); for(j=0, (p-p%2)/2, mapput(v[i], j^2%p, 1))); if(!mapisdefined(v[i], kp) && !mapisdefined(m, kp), mapput(m, kp, 1); next); if(i-1==n, return(k)); break))}
Comments