OFFSET
1,2
EXAMPLE
a(11)=15, the sum of next 14 terms: 16+22+...+57=581. 581+58=639=15*42+9, 581+59=15*42+10, ..., 581+64 = 15*43. So a(11+15)=a(26)=64
MAPLE
A074137 := proc(nmax) local a, ipiv, apiv, incsum, nexta ; a := [1, 2, 3] ; ipiv := 2 ; while nops(a) < nmax do apiv := op(ipiv, a) ; while nops(a) < ipiv+apiv-1 do a := [op(a), op(-1, a)+1] ; od ; incsum := add(op(i, a), i=ipiv+1..nops(a)) ; nexta := apiv - ( incsum mod apiv ) ; while nexta <= op(-1, a) do nexta := nexta+apiv ; od ; a := [op(a), nexta] ; ipiv := ipiv+1 ; od ; a ; end ; A074137(180) ; # R. J. Mathar, Mar 30 2007
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 28 2002
EXTENSIONS
More terms from Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 30 2006
More terms from R. J. Mathar, Mar 30 2007
STATUS
approved