|
|
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
|
|
|
FORMULA
|
|
|
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:
|
|
MATHEMATICA
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|