OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MAPLE
A127917 := proc(n) p := ithprime(n) ; (p-1)*p*(p+1) ; end: A027480 := proc(n) n*(n+1)*(n+2)/2 ; end: A := proc(n) A127917(n+1)/8-A027480(n) ; end: for n from 1 to 40 do printf("%d, ", A(n)) ; od: # R. J. Mathar, Aug 20 2008
MATHEMATICA
a[n_] = (Prime[n + 1] - 1)*Prime[n + 1]*(Prime[n + 1] + 1)/8 - n*(n + 1)*(n + 2)/2; Table[a[n], {n, 1, 30}]
f[n_]:=Module[{pr=Prime[n+1], n1=n+1}, (pr(pr^2-1))/8-(n1(n1^2-1))/2]; Array[f, 30] (* Harvey P. Dale, May 24 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Aug 12 2008
EXTENSIONS
Edited by N. J. A. Sloane, Aug 23 2008
STATUS
approved