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 A024698 #17 Dec 02 2022 13:20:27 %S A024698 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 A024698 27,27,28,32,33,34,35,37,38,39,41,42,43,45,45,48,48,49,50,53,56,57,57, %U A024698 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 A024698 a(n) = (prime(n+1) - 1)/4 if this is an integer or (prime(n+1) + 1)/4 otherwise. %D A024698 J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 283. %H A024698 Robert Israel, <a href="/A024698/b024698.txt">Table of n, a(n) for n = 1..10000</a> %F A024698 a(n) = ceiling((prime(n+1)-1)/4). - _Robert Israel_, Jan 23 2018 %F A024698 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 A024698 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 A024698 [seq(ceil((ithprime(i)-1)/4),i=2..100)]; # _Robert Israel_, Jan 23 2018 %t A024698 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 A024698 nonn %O A024698 1,3 %A A024698 _Clark Kimberling_