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 A385050 #20 Jul 12 2025 19:27:10 %S A385050 1,3,4,184,9,1479,20799,31509,162094,83554,828844,895449,4631104, %T A385050 86925309,97476129,14684224,33547264,5381151099,516743824,1958770564, %U A385050 112746608529,3046156864,373079083204,1394424964,297469886464,1596601563489,976001733184,33344131402059 %N A385050 a(n) is the least positive number k such that n is the greatest m such that k is a quadratic residue mod prime(i) for i=1..m and {k mod prime(i): i=1..m} are all distinct. %C A385050 For n >= 4, {a(n) mod 105} = {9, 79}. %e A385050 a(1) = 1: |{1}| = 1: 1 mod 2 = 1^2 mod 2, terminates at 1 mod 3 (not distinct: repeats 1 mod 2). %e A385050 a(2) = 3: |{1, 0}| = 2: 3 mod 2 = 1^2 mod 2, 3 mod 3 = 0^2 mod 3, terminates at 3 mod 5 (nonsquare). %e A385050 a(3) = 4: |{0, 1, 4}| = 3. %e A385050 a(4) = 184: |{0, 1, 4, 2}| = 4 (2 = 3^2 mod 7). %e A385050 a(5) = 9: |{1, 0, 4, 2, 9}| = 5. %e A385050 a(6) = 1479: |{1, 0, 4, 2, 5, 10}| = 6. %o A385050 (PARI) a(n)={my(v=List); for(k=1, oo, my(m=Map); for(i=1, oo, my(p=prime(i), 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))} %Y A385050 Cf. A377212 (nondistinct squares), A385051 (distinct nonsquares), A279074 (distinct moduli). %K A385050 nonn %O A385050 1,2 %A A385050 _Charles L. Hohn_, Jun 16 2025