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.

A125618 (Sum of the squares of the quadratic nonresidues of prime(n)) / prime(n).

This page as a plain text file.
%I A125618 #13 Dec 20 2024 02:15:39
%S A125618 10,23,23,40,65,117,127,199,209,254,319,474,441,654,583,765,1071,826,
%T A125618 1218,1252,1246,1476,1637,2000,2042,1899,2028,2974,3155,2998,3394,
%U A125618 3593,4291,3983,4469,5525,4867,5743,5301,7274,5964,6321,7446,7684,9013,9099
%N A125618 (Sum of the squares of the quadratic nonresidues of prime(n)) / prime(n).
%C A125618 Always an integer for primes > 5.
%D A125618 D. M. Burton, Elementary Number Theory, McGraw-Hill, Sixth Edition (2007), p. 185.
%H A125618 Nick Hobson, <a href="/A125618/b125618.txt">Table of n, a(n) for n = 4..1000</a>
%F A125618 a(n) = A125617(n)/prime(n).
%e A125618 The quadratic nonresidues of 7=prime(4) are 3, 5 and 6. Hence a(4) = (3^2 + 5^2 + 6^2)/7 = 10.
%t A125618 Table[Total[Complement[Range[p-1], Union[Table[PowerMod[k, 2, p], {k, p}]]]^2]/p, {p, Prime@Range[4,49]}] (* _James C. McMahon_, Dec 20 2024 *)
%o A125618 (PARI) vector(46, m, p=prime(m+3); t=1; for(i=2, (p-1)/2, t+=((i^2)%p)^2); (p-1)*(2*p-1)/6-t/p)
%Y A125618 Cf. A076409, A076410, A125613-A125618.
%K A125618 easy,nonn
%O A125618 4,1
%A A125618 _Nick Hobson_, Nov 30 2006