login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096379 a(n) = prime(n) + prime(n+1) - prime(n+2). 7

%I #51 Sep 08 2022 08:45:14

%S 0,1,1,5,7,11,13,13,21,23,27,35,37,37,41,51,53,57,65,65,69,73,75,85,

%T 95,97,101,103,95,109,121,129,127,137,143,145,153,157,161,171,169,179,

%U 187,191,185,187,207,221,223,223,231,229,235,245,251,261,263,267,275,271

%N a(n) = prime(n) + prime(n+1) - prime(n+2).

%C Sequence is non-monotonic: see, e.g., a(29), a(33), and a(41). - _Zak Seidov_, Jan 21 2013

%C Ishikawa proved that a(n) > 0 for n > 1. - _Jonathan Sondow_, Feb 13 2014

%H Michel Marcus, <a href="/A096379/b096379.txt">Table of n, a(n) for n = 1..5000</a> (terms 1..1000 from Zak Seidov)

%H Heihachiro Ishikawa, <a href="http://www.jstor.org/stable/43700113">Über die Verteilung der Primzahlen</a>, Sci. Rep. Tokyo Bunrika Daigaku, Sect. A 2 (1934), 27-40.

%F a(n) = A001043(n) - A000040(n+2). - _A.H.M. Smeets_, Aug 17 2019

%F a(n) = A000040(n) - A001223(n+1). - _Jon Maiga_, Aug 17 2019

%e a(1) = prime(1) + prime(2) - prime(3) = 2 + 3 - 5 = 0.

%e a(25) = prime(25) + prime(26) - prime(27) = 97 + 101 - 103 = 95.

%p A096379 := proc(n)

%p ithprime(n+1)+ithprime(n)-ithprime(n+2) ;

%p end proc:

%p seq(A096379(n),n=1..80) ; # _R. J. Mathar_, Sep 10 2016

%t #[[1]] + #[[2]] - #[[3]] & /@ Partition[Prime[Range[62]], 3, 1] (* _Zak Seidov_, Apr 09 2013 *)

%t ListConvolve[{-1,1,1},Prime[Range[100]]] (* _Zak Seidov_, Dec 03 2014 *)

%o (PARI) g(n)=for(x=1,n,print1(prime(x)+prime(x+1)-prime(x+2)","))

%o (PARI) first(n)=my(v=vector(n),p=2,q=3,k); forprime(r=5,, if(k++>n, break); v[k]=p+q-r; p=q; q=r); v \\ _Charles R Greathouse IV_, Oct 03 2017

%o (Magma) [NthPrime(n)+NthPrime(n+1)-NthPrime(n+2):n in [1..60]]; // _Marius A. Burtea_, Aug 17 2019

%Y Cf. A000040, A001043, A001223.

%K nonn,easy

%O 1,4

%A _Cino Hilliard_, Aug 04 2004

%E Edited by _Zak Seidov_, Aug 27 2012

%E Definition reworded by _N. J. A. Sloane_, Aug 27 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 13:50 EDT 2024. Contains 371724 sequences. (Running on oeis4.)