login
A226743
Number of alternating sums of consecutive primes with result 2n-1.
0
1, 1, 2, 2, 3, 1, 2, 3, 2, 3, 5, 4, 4, 4, 5, 4, 5, 5, 4, 6, 5, 4, 9, 5, 5, 7, 6, 6, 10, 7, 9, 5, 11, 6, 6, 9, 8, 8, 9, 9, 9, 12, 8, 8, 10, 7, 9, 9, 12, 11, 8, 11, 12, 6, 10, 6, 8, 14, 10, 12, 13, 10, 11, 5, 11, 9, 11, 16, 11, 11, 14, 10, 10, 13, 10, 17, 12, 11, 18, 13, 13, 11, 18, 11, 13, 12, 14, 16, 17, 14, 10, 15, 11, 12
OFFSET
1,3
COMMENTS
Since A008347 has no duplicate values, a(n) must be finite. This is not true for even results of the sum.
EXAMPLE
n=5: 11-7+5=2*5-1, 13-11+7=2*5-1, 19-17+13-11+7-5+3=2*5-1, so a(5)=3.
PROG
(PARI) vb=vecsmall(500); for(k=2, 1000, forstep(l=k-1, 1, -1, t=sum(i=l, k, prime(i)*(-1)^(k-i)); if(t<500, vb[t]=vb[t]+1)))
CROSSREFS
Cf. A084143.
Sequence in context: A282863 A308662 A284051 * A166269 A181648 A182910
KEYWORD
nonn
AUTHOR
Ralf Stephan, Sep 01 2013
STATUS
approved