OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = A127918(n)/3. - Michel Marcus, Apr 09 2017
MATHEMATICA
Table[(Prime[n] + 1) Prime[n](Prime[n] - 1)/6, {n, 1, 100}]
((#-1)#(#+1))/6&/@Prime[Range[40]] (* Harvey P. Dale, Dec 23 2019 *)
PROG
(PARI) forprime(p=2, 1e3, print1(binomial(p+1, 3)", ")) \\ Charles R Greathouse IV, Jun 16 2011
(Python)
from sympy import prime
print([(prime(n) - 1)*prime(n)*(prime(n) + 1)//6 for n in range(1, 101)]) # Indranil Ghosh, Apr 09 2017
(Magma) [(NthPrime(n) + 1)*NthPrime(n)*(NthPrime(n) - 1)/6: n in [1..40]]; // Vincenzo Librandi, Apr 09 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Feb 06 2007
STATUS
approved