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.

A109818 Sum of primes between n and n^2.

This page as a plain text file.
%I A109818 #7 Apr 02 2024 10:45:05
%S A109818 0,5,15,36,95,150,318,484,774,1043,1576,2099,2886,3790,4620,6040,7941,
%T A109818 9465,11541,13810,16763,19982,23515,26840,32253,37461,42368,48394,
%U A109818 55737,62668,70112,80029,89512,100678,111427,124051,135954,148630,166354
%N A109818 Sum of primes between n and n^2.
%e A109818 a(3) = 15 because 3, 5 and 7 are the A073882(3) = 3 primes in the interval from 3 to 3^2 inclusive and 3 + 5 + 7 = 15.
%t A109818 Join[{0},Table[Sum[Prime[i],{i,If[PrimeQ[n],PrimePi[n],PrimePi[n]+1],PrimePi[n^2]}],{n,2,39}]] (* _James C. McMahon_, Apr 02 2024 *)
%o A109818 (PARI) for(n=1,50,print1(sum(k=n,n^2,if(isprime(k),k)),","))
%Y A109818 Cf. A109819 (product of same primes), A073882 (number of primes between n and n^2).
%K A109818 easy,nonn
%O A109818 1,2
%A A109818 _Rick L. Shepherd_, Jul 02 2005