A127920 1/6 of product of three numbers: n-th prime, previous and following number.
1, 4, 20, 56, 220, 364, 816, 1140, 2024, 4060, 4960, 8436, 11480, 13244, 17296, 24804, 34220, 37820, 50116, 59640, 64824, 82160, 95284, 117480, 152096, 171700, 182104, 204156, 215820, 240464, 341376, 374660, 428536, 447580, 551300, 573800, 644956
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[(NthPrime(n) + 1)*NthPrime(n)*(NthPrime(n) - 1)/6: n in [1..40]]; // Vincenzo Librandi, 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 *)
-
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
Formula
a(n) = A127918(n)/3. - Michel Marcus, Apr 09 2017