A121049 Let p_n be the polynomial of degree n-1 that interpolates the first n primes (i.e., p_n(i) = prime(i) for 1 <= i <= n.) Then a(n) = p_n(n+1)/2.
1, 2, 4, 4, 11, -3, 36, -46, 133, -213, 419, -586, 716, -199, -1807, 7570, -20637, 47563, -97849, 185438, -326192, 531721, -785058, 980926, -780084, -700944, 5511613, -18000159, 46704269, -107137804, 225187101, -439627178, 799622938, -1347732434, 2069035230
Offset: 1
Examples
p_3(x) = (x^2-x+4)/2. p_3(1) = 2, p_3(2) = 3, p_3(3) = 5, so a(3) = p_3(4)/2 = 4.
Programs
-
Mathematica
Table[ Sum[(-1)^(j + r)Prime[j] Binomial[r, j - 1]/2, {j, r}], {r, 50}]
Formula
a(n) = Sum_{j=1..n} (-1)^(j+n)*prime(j)*binomial(n,j-1)/2.
Extensions
Edited and extended by David Wasserman, Aug 16 2006
Corrected by N. J. A. Sloane, Oct 29 2006
Comments