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.

A320688 Sum of the square excess A056892 of the primes between two squares.

This page as a plain text file.
%I A320688 #14 Dec 19 2024 23:40:08
%S A320688 3,4,6,11,10,24,26,34,26,33,50,67,72,46,70,109,96,132,122,153,132,145,
%T A320688 174,229,208,175,194,287,232,244,338,267,276,345,374,239,392,396,424,
%U A320688 390,484,373,514,563,618,424,654,821,442,557,890,814,668,741,580,642,990,811,982,968,772
%N A320688 Sum of the square excess A056892 of the primes between two squares.
%C A320688 Consider the primes p1,...,pK between two squares n^2 and (n+1)^2, and take the sum of the differences: (p1 - n^2) + ... + (pK - n^2). Obviously this equals (sum of these primes) - (number of these primes) * n^2.
%H A320688 Robert Israel, <a href="/A320688/b320688.txt">Table of n, a(n) for n = 1..10000</a>
%F A320688 a(n) = A108314(n) - A014085(n)*A000290(n), where A000290(n) = n^2.
%p A320688 R:= NULL: p:= 2: n:= 1: t:= 0:
%p A320688 while n <= 100 do
%p A320688     t:= t + p-n^2;
%p A320688     p:= nextprime(p);
%p A320688     if p > (n+1)^2 then
%p A320688      R:= R, t; t:= 0; n:= n+1;
%p A320688     fi:
%p A320688 od:
%p A320688 R; # _Robert Israel_, Dec 17 2024
%o A320688 (PARI) a(n,s=0)={forprime(p=n^2,(n+1)^2,s+=p-n^2);s}
%Y A320688 Cf. A014085, A000290, A108314, A106044.
%Y A320688 Row sums of A056892, read as a table.
%K A320688 nonn
%O A320688 1,1
%A A320688 _M. F. Hasler_, Oct 19 2018