cp's OEIS Frontend

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.

A048280 Length of longest run of consecutive quadratic residues mod prime(n).

This page as a plain text file.
%I A048280 #41 May 23 2020 22:45:24
%S A048280 2,2,3,3,3,3,5,4,5,4,4,4,5,5,5,3,5,5,6,7,9,6,7,5,9,7,7,6,5,5,7,8,6,5,
%T A048280 4,7,6,6,6,6,6,6,7,9,7,6,7,7,7,5,6,7,13,7,6,7,8,7,10,6,9,9,7,11,9,5,8,
%U A048280 9,8,6,6,8,9,6,8,8,8,5,7,13,8,7,7,9,10,8,8,9,8,8,11,13,8,8,10,8,9,8,10,7,9,9,10,10,7,9
%N A048280 Length of longest run of consecutive quadratic residues mod prime(n).
%C A048280 0 and 1 are consecutive quadratic residues for any prime, so a(n) >= 2.
%C A048280 "Consecutive" allows wrap-around, so p-1 and 0 are consecutive. - _Robert Israel_, Jul 20 2014
%C A048280 A002307(n) is defined similarly, except that only positive reduced quadratic residues are counted. - _Jonathan Sondow_, Jul 20 2014
%C A048280 For longest runs of quadratic nonresidues, see A002308. - _Jonathan Sondow_, Jul 20 2014
%H A048280 Robert Israel, <a href="/A048280/b048280.txt">Table of n, a(n) for n = 1..10000</a>
%H A048280 P. Pollack and E. Treviño, <a href="http://pollack.uga.edu/mullin.pdf">The primes that Euclid forgot</a>, Amer. Math. Monthly, 121 (2014), 433-437.
%H A048280 Enrique Treviño, <a href="http://campus.lakeforest.edu/trevino/CorrigendumConstantCharacter.pdf">Corrigendum to “On the maximum number of consecutive integers on which a character is constant”</a>, Mosc. J. Comb. Number Theory 7 (2017), no. 3, 1-2.
%F A048280 a(n) < 2*sqrt(prime(n)) for n >= 1 (see Pollack and Treviño for n > 1). - _Jonathan Sondow_, Jul 20 2014
%F A048280 a(n) >= A002307(n). - _Jonathan Sondow_, Jul 20 2014
%F A048280 a(n) < 7 prime(n)^(1/4)log(prime(n)) for all n > 1, or a(n) < 3.2 prime(n)^(1/4)log(prime(n)) for n >= 10^13. - _Enrique Treviño_, Apr 16 2020
%e A048280 For n = 7, prime(7) = 17 has consecutive quadratic residues 15,16,0,1,2, and no longer sequence of consecutive quadratic residues, so a(7)=5.
%p A048280 A:= proc(n) local P, res, nonres, nnr;
%p A048280      P:= ithprime(n);
%p A048280      res:= {seq(i^2,i=0..floor((P-1)/2)};
%p A048280      nonres:= {$1..P-1} minus res;
%p A048280      nnr:= nops(nonres);
%p A048280      max(seq(nonres[i+1]-nonres[i]-1,i=1..nnr-1),nonres[1]-nonres[-1]+P-1)
%p A048280 end proc;
%p A048280 A(1):= 2:
%p A048280 seq(A(n),n=1..100); # _Robert Israel_, Jul 20 2014
%Y A048280 Cf. A002307, A048281.
%K A048280 nonn
%O A048280 1,1
%A A048280 _David W. Wilson_
%E A048280 Offset corrected to 1 and definition clarified by _Jonathan Sondow_ Jul 20 2014