OFFSET
1,3
FORMULA
a(n) = prime(n)*(prime(n)+1)/2 - sum_{1..n} prime(k) - 1.
Asymptotic expression: a(n) ~ n^2 * log(n)^2 / 2.
EXAMPLE
Prime(6) = 13, so a(6) = 4 + 6 + 8 + 9 + 1 0 + 12 = 49 = 13*14/2 - 13 - 11 - 7 - 5 - 3 - 2 - 1.
MAPLE
with(numtheory): A079725 := proc(n) local i:
RETURN(ithprime(n)*(ithprime(n)+1)/2 add(ithprime(i), i=1..n)-1):
end;
MATHEMATICA
a[n_] := Block[{p = Prime[n], k}, k = p(p + 1)/2 - 1 - Sum[Prime[i], {i, 1, n}]]; Table[ a[n], {n, 1, 45}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Feb 18 2003
EXTENSIONS
Edited and extended by Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Robert G. Wilson v and T. D. Noe, Feb 18 2003
STATUS
approved