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
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