%I #102 Sep 28 2024 16:06:11
%S 1,0,2,-2,2,-2,2,2,-4,4,-2,-2,2,2,0,-4,4,-2,-2,4,-2,2,2,-4,-2,2,-2,2,
%T 10,-10,2,-4,8,-8,4,0,-2,2,0,-4,8,-8,2,-2,10,0,-8,-2,2,2,-4,8,-4,0,0,
%U -4,4,-2,-2,8,4,-10,-2,2,10,-8,4,-8,2,2,2,-2,0,-2,2,2,-4,4,2,-8,8,-8,4,-2,2,2,-4,-2,2,8,-4
%N Second differences of primes.
%H Edward Bernstein, <a href="/A036263/b036263.txt">Table of n, a(n) for n = 1..100000</a> (Terms 1 to 10000 from T. D. Noe)
%H R. G. Batchko, <a href="http://arxiv.org/abs/1405.2900">A prime fractal and global quasi-self-similar structure in the distribution of prime-indexed primes</a>, arXiv preprint arXiv:1405.2900 [math.GM], 2014. See Table 2.
%F a(A064113(n)) = 0. - _Reinhard Zumkeller_, Jan 20 2012
%F a(n) = prime(n) + prime(n+2) - 2*prime(n+1). - _Thomas Ordowski_, Jul 21 2012
%F Conjecture: |a(1)| + |a(2)| + ... + |a(n)| ~ prime(n). - _Thomas Ordowski_, Jul 21 2012
%F a(n) = A001223(n+1) - A001223(n). - _R. J. Mathar_, Sep 19 2013
%F Sum_{i = 1..n - 1} a(i) = A046933(n), n >= 1. - _Daniel Forgues_, Apr 15 2014
%F Sum_{i = 2..n - 1} a(i) = prime(n + 1) - prime(n) - 2; Sum_{i = 2..n - 1} a(i) = 0 whenever prime(n) is a lesser of twin primes. - _Hamdi Murat Yildirim_, Jun 24 2014
%e a(3) = 5 + 11 - 2*7 = 16 - 14 = 2.
%p A036263:=n->ithprime(n) + ithprime(n+2) - 2*ithprime(n+1); seq(A036263(n), n=1..100); # _Wesley Ivan Hurt_, Apr 01 2014
%t Table[Prime[n - 1] + Prime[n + 1] - 2*Prime[n], {n, 2, 105}]
%t Differences[Prime[Range[100]], 2] (* _Harvey P. Dale_, Oct 14 2012 *)
%o (PARI) for(n=2,100,print1(prime(n+2)-2*prime(n+1)+prime(n)","))
%o (Haskell)
%o a036263 n = a036263_list !! (n-1)
%o a036263_list = zipWith (-) (tail a001223_list) a001223_list
%o -- _Reinhard Zumkeller_, Oct 29 2011
%o (Python)
%o from sympy import prime
%o def A036263(n): return prime(n)-(prime(n+1)<<1)+prime(n+2) # _Chai Wah Wu_, Sep 28 2024
%Y Cf. A001223, A036262, A051635, A006562, A051634, A147812, A147813, A182394, A079054, A064113 (places of zeros).
%Y For records see A293154, A293155.
%K sign,easy,nice
%O 1,3
%A _N. J. A. Sloane_