A379542 Second term of the n-th differences of the prime numbers.
3, 2, 0, 2, -6, 14, -30, 62, -122, 220, -344, 412, -176, -944, 4112, -11414, 26254, -53724, 100710, -175034, 281660, -410896, 506846, -391550, -401486, 2962260, -9621128, 24977308, -57407998, 120867310, -236098336, 428880422, -719991244, 1096219280
Offset: 0
Keywords
Crossrefs
Programs
-
Mathematica
nn=40;Table[Differences[Prime[Range[nn+2]],n][[2]],{n,0,nn}]
-
PARI
a(n) = sum(k=0, n, (-1)^(n-k) * binomial(n,k) * prime(k+2)); \\ Michel Marcus, Jan 12 2025
Formula
a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * prime(k+2).
Comments