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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A163059 An alternating sum from 4*n-3 up to the smaller of the n-th twin primes. 1
 2, 5, 10, 15, 23, 31, 42, 50, 67, 72, 89, 97, 114, 122, 127, 144, 152, 169, 177, 194, 214, 252, 260, 277, 309, 335, 352, 363, 377, 388, 465, 473, 478, 495, 509, 580, 588, 599, 607, 624, 656, 697, 723, 731, 739, 750, 806, 820, 837, 842, 904, 912, 938, 955, 969, 1004 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Consider the alternating sums S(l,h) = -sum_{j=l..u} j*(-1)^j = A001057(u)-A001057(l-1). a(n) is this sum for a lower limit of 4n-3 = A016813(n-1) and an upper limit of A001359(n). LINKS Table of n, a(n) for n=1..56. FORMULA a(n) = A001057(A001359(n))-A001057(4*n-4). a(n) = (A001359(n)+A016813(n-1))/2. - L. Edson Jeffery, Dec 14 2014 EXAMPLE a(1)=1-2+3=2. a(2)=5. a(3)=9-10+11=10. a(4)=13-14+15-16+17=15. a(5)=17-18+19-20+21-22+23-24+25-26+27-28+29=23. MAPLE A001057 := proc(n) (-1)^(n+1)*floor((n+1)/2) ; end: A001359 := proc(n) local a; option remember ; if n = 1 then 3; else for a from procname(n-1)+1 do if isprime(a) and isprime(a+2) then RETURN(a) ; fi; od: fi; end: A163059 := proc(n) A001057(A001359(n))-A001057(4*n-4) ; end: seq(A163059(n), n=1..80) ; # R. J. Mathar, Aug 02 2009 MATHEMATICA p := Select[Prime[Range[280]], PrimeQ[# + 2] &]; Table[(p[[n]] + 4*n - 3)/2, {n, Length[p]}] (* L. Edson Jeffery, Dec 14 2014 (after Robert G. Wilson v) *) CROSSREFS Cf. A001359, A016813. Sequence in context: A008822 A267454 A013927 * A099738 A064513 A117582 Adjacent sequences: A163056 A163057 A163058 * A163060 A163061 A163062 KEYWORD nonn AUTHOR Juri-Stepan Gerasimov, Jul 20 2009 EXTENSIONS a(5) and a(23)-a(25) corrected by R. J. Mathar, Aug 02 2009 STATUS approved

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.

Last modified August 11 03:32 EDT 2024. Contains 375059 sequences. (Running on oeis4.)