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!)
A102552 a(n) = prime(n)-(prime(n+1)+prime(n-1))/2. 2

%I #25 Oct 19 2023 13:55:40

%S 0,-1,1,-1,1,-1,-1,2,-2,1,1,-1,-1,0,2,-2,1,1,-2,1,-1,-1,2,1,-1,1,-1,

%T -5,5,-1,2,-4,4,-2,0,1,-1,0,2,-4,4,-1,1,-5,0,4,1,-1,-1,2,-4,2,0,0,2,

%U -2,1,1,-4,-2,5,1,-1,-5,4,-2,4,-1,-1,-1,1,0,1,-1,-1,2,-2,-1,4,-4,4,-2,1,-1,-1,2,1,-1,-4,2,2,-2,2,-1,-3,5,-8,6,-2,2,0,2,-2

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

%D Eric Weisstein, CRC Concise Encyclopedia of Mathematics, 1998, page 1321.

%F a(n) = -(1/2)*(A001223(n+1)-A001223(n))

%F a(n) = -A036263(n-1)/2. - _T. D. Noe_, Oct 06 2006 [corrected by _Georg Fischer_, Oct 19 2023]

%e a(6)=-1 because 13-(17+11)/2=-1.

%p a:=n->ithprime(n)-(ithprime(n+1)+ithprime(n-1))/2: seq(a(n),n=3..95); # _Emeric Deutsch_, Mar 02 2005

%t f[n_] := Prime[n] - (Prime[n - 1] + Prime[n + 1])/2; Table[f[n], {n, 3, 107}] (* _Robert G. Wilson v_, Sep 25 2006 *)

%t #[[2]]-(#[[1]]+#[[3]])/2&/@Partition[Prime[Range[2,110]],3,1] (* _Harvey P. Dale_, Sep 21 2013 *)

%o (PARI) a(n) = prime(n)-(prime(n+1)+prime(n-1))/2;

%o vector(100,n,a(n+2)) \\ _Joerg Arndt_, Jan 20 2015

%Y Cf. A000040, A036263, A066875, A006562, A051634, A051635.

%K sign

%O 3,8

%A _Yasutoshi Kohmoto_, Feb 25 2005

%E More terms from _Emeric Deutsch_, Mar 02 2005

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 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)