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 A282041 #12 Apr 07 2017 13:16:17 %S A282041 7,92,186,423,994,1343,2369,3683,5134,6012,7831,8955,11596,12428, %T A282041 15517,16802,21148,28720,31929,33321,41807,44778,51856,51253,57466, %U A282041 57845,82063,88015,95281,97050,117916,127225,130025,135180,165423,161927,176915,183609,193132,202180,228212,228056,236849 %N A282041 Let p = n-th prime == 7 mod 8; a(n) = sum of quadratic residues mod p. %H A282041 Vincenzo Librandi, <a href="/A282041/b282041.txt">Table of n, a(n) for n = 1..2500</a> %H A282041 Aebi, Christian, and Grant Cairns. <a href="http://arxiv.org/abs/1512.00896">Sums of Quadratic residues and nonresidues</a>, arXiv preprint arXiv:1512.00896 (2015). %p A282041 with(numtheory): %p A282041 Ql:=[]; Qu:=[]; Q:=[]; Nl:=[]; Nu:=[]; N:=[]; %p A282041 for i1 from 1 to 300 do %p A282041 p:=ithprime(i1); %p A282041 if (p mod 8) = 7 then %p A282041 ql:=0; qu:=0; q:=0; nl:=0; nu:=0; n:=0; %p A282041 for j from 1 to p-1 do %p A282041 if legendre(j, p)=1 then %p A282041 q:=q+j; %p A282041 if j<p/2 then ql:=ql+j; else qu:=qu+j; fi; %p A282041 else %p A282041 n:=n+j; %p A282041 if j<p/2 then nl:=nl+j; else nu:=nu+j; fi; %p A282041 fi; %p A282041 od; %p A282041 Ql:=[op(Ql), ql]; %p A282041 Qu:=[op(Qu), qu]; %p A282041 Q:=[op(Q), q]; %p A282041 Nl:=[op(Nl), nl]; %p A282041 Nu:=[op(Nu), nu]; %p A282041 N:=[op(N), n]; %p A282041 fi; %p A282041 od: %p A282041 Ql; Qu; Q; Nl; Nu; N; # A282039, A282040, A282041, A282039 again, A282042, A282043 %t A282041 Table[Table[Mod[a^2, p], {a, 1, (p-1)/2}]//Total, {p, Select[Prime[Range[100]], Mod[#, 8] == 7 &]}] (* _Vincenzo Librandi_, Feb 21 2017 *) %Y A282041 Cf. A282035-A282043 and A282721-A282727. %K A282041 nonn %O A282041 1,1 %A A282041 _N. J. A. Sloane_, Feb 20 2017