OFFSET
1,4
COMMENTS
This sequence is the difference between A071148 and A005563, as seen in the following tabular example: first column is prime, 2nd is odd, 3rd is prime sum (A071148), 4th is odd sum (A005563), 5th is the difference at each summation, the prime sequence increasingly greater.
3 3 3 3 0
5 5 8 8 0
7 7 15 15 0
11 9 26 24 2
13 11 39 35 4
17 13 56 48 8
19 15 75 63 12
23 17 98 80 18
29 19 127 99 28
31 21 158 120 38
FORMULA
Beginning with 3 for both the prime and odd sequences, compute cumulative sums of both sequences and take the difference
EXAMPLE
a(2)=0 because for the prime sequence beginning at 3, the sum is 8 (3+5). For the odd sequence beginning at 3 the sum is also 8 (3+5) and 8-8=0.
PROG
(UBASIC) 10 N=1:A=2 20 A=nxtprm(A):B=B+A 30 N=N+2:D=D+N 40 print A; N; B; D; B-D:stop 50 C=C+1: if C<60 then 20
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Oct 13 2007
STATUS
approved