The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A320687 Sum of differences of the larger square and primes between two squares. 1
 3, 6, 8, 16, 12, 28, 19, 34, 31, 72, 42, 58, 63, 70, 116, 122, 79, 90, 112, 134, 169, 170, 108, 212, 200, 196, 246, 226, 240, 244, 292, 318, 394, 276, 336, 418, 283, 528, 445, 582, 429, 392, 530, 416, 565, 506, 581, 634, 548, 554, 655, 866, 616, 676, 641, 714, 965, 710, 922, 968, 827 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Consider the primes p1,...,pK between two squares n^2 and (n+1)^2, and take the sum of the differences (listed as A106044): ((n+1)^2 - p1) + ... + ((n+1)^2 - pK). LINKS Robert Israel, Table of n, a(n) for n = 1..10000 FORMULA a(n) = A014085(n)*A000290(n+1) - A108314(n), where A000290(n) = n^2. EXAMPLE a(1) = 3 = 2 + 1, where {2, 1} = 4 - {2, 3: primes between 1^2 = 1 and 2^2 = 4}. a(2) = 6 = 4 + 2, with {4, 2} = 9 - {5, 7: primes between 2^2 = 4 and 3^2 = 9}. a(3) = 8 = sum of {5, 3} = 16 - {11, 13: primes between 3^2 = 9 and 4^2 = 16}. a(4) = 16 = sum of {8, 6, 2} = 25 - {17, 19, 23: primes between 4^2 and 5^2 = 25}. a(5) = 12 = sum of {7, 5} = 36 - {29, 31: primes between 5^2 = 25 and 6^2 = 36}. MAPLE N:= 100: # to get a(1)..a(N) V:= Vector(N): p:= 1; do    p:= nextprime(p);    n:= floor(sqrt(p));    if n > N then break fi;    V[n]:= V[n]+(n+1)^2-p; od: convert(V, list); # Robert Israel, Jun 17 2019 PROG (PARI) a(n, s=0)={forprime(p=n^2, (n+=1)^2, s+=n^2-p); s} CROSSREFS Equals A014085 * A000290(.+1) - A108314. Row sums of A106044 read as a table. Sequence in context: A165298 A117148 A305595 * A340494 A039567 A032912 Adjacent sequences:  A320684 A320685 A320686 * A320688 A320689 A320690 KEYWORD nonn AUTHOR M. F. Hasler, Oct 19 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 13 15:23 EDT 2021. Contains 342936 sequences. (Running on oeis4.)