login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A161180
Sum of primes between n^2 and n^2+n, n^2+n and (n+1)^2. The only intervals for which n^2+n is prime are [1,2], [2,4] and the endpoint 2 is included in the sum. One might have written 0,3,5,7,..., etc.
1
2, 5, 5, 7, 11, 13, 36, 23, 29, 31, 78, 90, 53, 120, 138, 152, 172, 97, 420, 113, 258, 276, 300, 487, 533, 384, 396, 434, 928, 492, 1060, 841, 293, 1248, 668, 1408, 1119, 1169, 1229, 1724, 1810, 1409, 1980, 1553, 1088, 2260, 2356, 3057, 2562, 2646, 2752, 2155
OFFSET
1,1
EXAMPLE
On [1,2] the sum of primes is 2. For [2,4] the sum is 5. [4,6]: 5, [6,9]: 7, [9,12]: 11, [12,16]: 13, [16,20]: 17+19 = 36.
MAPLE
A161180 := proc(n) a := 0 ; if type(n, 'odd') then nloc := (n+1)/2 ; for p from nloc^2 to nloc^2+nloc do if isprime(p) then a := a+p ; end if; end do: else nloc := n/2 ; for p from nloc^2+nloc to (nloc+1)^2 do if isprime(p) then a := a+p ; end if; end do: end if; a; end proc: seq(A161180(n), n=1..120) ; # R. J. Mathar, May 31 2010
CROSSREFS
Sequence in context: A175649 A240497 A142353 * A101858 A329813 A165917
KEYWORD
easy,nonn
AUTHOR
Daniel Tisdale, Jun 05 2009
EXTENSIONS
Corrected (128 replaced by 138) and extended by R. J. Mathar, May 31 2010
STATUS
approved