let n,m be positive integers st m>n≥5 with m depending on n.
consider the sequence a1,a2,...am where
ai=i for i=1,...,nan+j=a3j+a3j−1+a3j−2 for j=1,..,m−n
with m−3(m−n)=1 or 2, ie am=am−k+am−k−1+am−k−2 where k=1 or 2
(Thus if n=5, the sequence is 1,2,3,4,5,6,15
and if n=8, the sequence is 1,2,3,4,5,6,7,8,6,15,21)
Find S=a1+...+am if (i) n=2007 (ii) n=2008