login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A261470
a(n) = prime(n+3) - prime(n+2) - prime(n+1) + prime(n).
3
1, 2, 0, 0, 0, 0, 4, -2, 0, 2, -4, 0, 4, 2, -4, 0, 2, -4, 2, 2, 0, 4, -2, -6, 0, 0, 0, 12, 0, -8, -2, 4, 0, -4, 4, -2, 0, 2, -4, 4, 0, -6, 0, 8, 10, -8, -10, 0, 4, -2, 4, 4, -4, 0, -4, 0, 2, -4, 6, 12, -6, -12, 0, 12, 2, -4, -4, -6, 4, 4, 0, -2, -2, 0, 4, -2, 0
OFFSET
1,2
LINKS
FORMULA
a(n) = A001223(n+2) - A001223(n). - Reinhard Zumkeller, Aug 22 2015
EXAMPLE
a(5) = 19 - 17 - 13 + 11 = 0.
MATHEMATICA
Table[Prime[i+3] - Prime[i+2] - Prime[i+1] + Prime[i], {i, 100}] (* G. C. Greubel, Aug 20 2015 *)
PROG
(PARI) first(m)=vector(m, i, prime(i+3)+prime(i)-prime(i+1)-prime(i+2)) \\ Anders Hellström, Aug 20 2015
(Haskell)
a261470 n = a261470_list !! (n-1)
a261470_list = zipWith (-) (drop 2 a001223_list) a001223_list
-- Reinhard Zumkeller, Aug 22 2015
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Altug Alkan, Aug 20 2015
STATUS
approved