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”).
%I #18 Aug 22 2015 10:07:27
%S 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,
%T -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,
%U 6,12,-6,-12,0,12,2,-4,-4,-6,4,4,0,-2,-2,0,4,-2,0
%N a(n) = prime(n+3) - prime(n+2) - prime(n+1) + prime(n).
%H Reinhard Zumkeller, <a href="/A261470/b261470.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A001223(n+2) - A001223(n). - _Reinhard Zumkeller_, Aug 22 2015
%e a(5) = 19 - 17 - 13 + 11 = 0.
%t Table[Prime[i+3] - Prime[i+2] - Prime[i+1] + Prime[i], {i,100}] (* _G. C. Greubel_, Aug 20 2015 *)
%o (PARI) first(m)=vector(m,i,prime(i+3)+prime(i)-prime(i+1)-prime(i+2)) \\ _Anders Hellström_, Aug 20 2015
%o (Haskell)
%o a261470 n = a261470_list !! (n-1)
%o a261470_list = zipWith (-) (drop 2 a001223_list) a001223_list
%o -- _Reinhard Zumkeller_, Aug 22 2015
%Y Cf. A022884, A022885, A093667.
%Y Cf. A001223.
%K sign,easy
%O 1,2
%A _Altug Alkan_, Aug 20 2015