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 A248376 #16 Feb 16 2025 08:33:23 %S A248376 1,2,3,4,3,6,4,8,3,8,4,12,5,8,12,8,4,6,5,12,12,8,6,24,3,8,3,16,4,18,5, %T A248376 8,12,8,13,12,5,10,15,32,6,24,6,16,12,12,6,24,4,8,18,20,7,6,13,32,15, %U A248376 10,6,48,7,10,12,8,13,24,7,16,18,20,8,24,5,10 %N A248376 Maximal gap between quadratic residues mod n; here quadratic residues must be coprime to n. %C A248376 The definition of quadratic residue modulo a nonprime varies from author to author. Sometimes, quadratic residues are not required to be coprime to n, cf. A248222 for the corresponding variant of this sequence. %D A248376 K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, Springer, 1982, p. 194. [Requires gcd(q,n)=1 for q to be a quadratic residue mod n.] %D A248376 F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier-North Holland, 1978, p. 45. %D A248376 G. B. Mathews, Theory of Numbers, 2nd edition. Chelsea, NY, p. 32. [Does not require gcd(q,n)=1.] %D A248376 Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers, New York: John Wiley, 2nd ed., 1966, p. 69. [Requires gcd(q,n)=1 for q to be a quadratic residue mod n.] %D A248376 J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 270. [Does not require gcd(q,n)=1.] %H A248376 David W. Wilson, <a href="/A248376/b248376.txt">Table of n, a(n) for n = 1..10000</a> %H A248376 Eric W. Weisstein, <a href="https://mathworld.wolfram.com/QuadraticResidue.html">MathWorld: Quadratic Residue</a> %H A248376 Wikipedia, <a href="http://en.wikipedia.org/wiki/Quadratic_residue">Quadratic residue</a> %o A248376 (PARI) a(n)={L=m=1;for(i=2,n+1,gcd(i,n)>1&&next;issquare(Mod(i,n))||next;i-L>m&&m=i-L;L=i);m} %Y A248376 Cf. A063987, A130290, A088190, A088191, A088192, A248222. %K A248376 nonn %O A248376 1,2 %A A248376 _David W. Wilson_ and _M. F. Hasler_, Oct 05 2014