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 #26 May 15 2023 16:50:24
%S -1,-7,1,-23,73,49,217,193,217,721,553,1057,1513,1489,1609,2137,3241,
%T 2953,3937,4753,4417,5593,5857,6433,8617,9793,9769,11017,10993,9409,
%U 15097,15553,18217,16441,21601,20953,22729,25249,25849,27817,31321,29041,35713
%N a(n) = 2*prime(n)^2 - prime(n+1)^2.
%C Theorem: a(n) > 0 for all n > 4.
%D D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, 1996, Section VII.18, p. 247.
%H Harry J. Smith, <a href="/A064051/b064051.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = 2*A001248(n) - A001248(n+1). - _Elmo R. Oliveira_, Jan 13 2023
%t Table[2 Prime[n]^2 - Prime[n+1]^2, {n, 45}] (* _Vincenzo Librandi_, Jun 22 2018 *)
%t 2#[[1]]-#[[2]]&/@Partition[Prime[Range[50]]^2,2,1] (* _Harvey P. Dale_, May 15 2023 *)
%o (PARI) a(n) = 2*prime(n)^2 - prime(n + 1)^2; \\ _Harry J. Smith_, Sep 06 2009
%o (Magma) [2*NthPrime(n)^2 - NthPrime(n+1)^2: n in [1..45]]; // _Vincenzo Librandi_, Jun 22 2018
%Y Cf. A324798, A001248.
%K sign
%O 1,2
%A _N. J. A. Sloane_, Oct 15 2001