%I #17 Dec 02 2022 13:20:27
%S 1,1,2,3,3,4,5,6,7,8,9,10,11,12,13,15,15,17,18,18,20,21,22,24,25,26,
%T 27,27,28,32,33,34,35,37,38,39,41,42,43,45,45,48,48,49,50,53,56,57,57,
%U 58,60,60,63,64,66,67,68,69,70,71,73,77,78,78,79,83,84,87,87,88,90,92,93,95,96,97,99,100
%N a(n) = (prime(n+1) - 1)/4 if this is an integer or (prime(n+1) + 1)/4 otherwise.
%D J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 283.
%H Robert Israel, <a href="/A024698/b024698.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = ceiling((prime(n+1)-1)/4). - _Robert Israel_, Jan 23 2018
%F a(n) = number of consecutive pairs of quadratic residues in 0,1,...,p-1 where p=prime(n+1). - _Michael Somos_, Feb 17 2020
%e a(4)=3 because for p=11, (0,1), (3,4), (4,5) are the pairs of consecutive quadratic residues modulo p. - _Michael Somos_, Feb 17 2020
%p [seq(ceil((ithprime(i)-1)/4),i=2..100)]; # _Robert Israel_, Jan 23 2018
%t pi[n_]:=Module[{c=(Prime[n+1]-1)/4},If[IntegerQ[c],c,(Prime[n+1]+1)/4]]; Array[pi,80] (* _Harvey P. Dale_, May 19 2018 *)
%K nonn
%O 1,3
%A _Clark Kimberling_