OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
46 is in the sequence because the fourth set of consecutive natural numbers that are also nonprimes is {8, 9, 10}, the sum of divisors of 8 is 1+2+4+8=15, the sum of divisors of 9 is 1+3+9=13, the sum of divisors of 10 is 1+2+5+10=18, so a(4) = 15+13+18 = 46.
MAPLE
with(numtheory):
a:= n-> `if`(n=1, 1, add(sigma(i), i=ithprime(n)+1..ithprime(n+1)-1)):
seq(a(n), n=1..80); # Alois P. Heinz, Oct 18 2011
MATHEMATICA
Table[Plus@@Flatten[Divisors[Range[Prime[n] - (-1)^Prime[n], Prime[n + 1] + (-1)^Prime[n + 1]]]], {n, 2, 50}] (* Alonso del Arte, Oct 18 2011 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 03 2011
STATUS
approved