OFFSET
1,1
COMMENTS
Define an alternating sum S(n) = Sum_{k=0..n} (1-(-1)^k*k) = A064455(n+1).
The sequence contains this sum evaluated for an upper limit of the odd nonprimes where the sum is even.
EXAMPLE
S(n) evaluated at n=1, 9, 15, 21, ... (taken from A014076) is 3, 15, 24, 33, 42, 51, etc., where only the even values (i.e., 24, 42, etc.) join the sequence.
MAPLE
A014076 := proc(n) option remember ; if n = 1 then 1; else for a from procname(n-1)+2 by 2 do if not isprime(a) then RETURN(a) ; fi; od: fi; end:
for n from 1 to 200 do if S(n) mod 2 = 0 then printf("%d, ", S(n)) ; fi; od: # R. J. Mathar, Jul 21 2009
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Juri-Stepan Gerasimov, Jul 16 2009
EXTENSIONS
Edited and values checked by R. J. Mathar Jul 21 2009
STATUS
approved