OFFSET
0,4
COMMENTS
a(5)=10 since 1+1+1+3+6=12 and 10 is the largest triangular number less than or equal to this.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
MATHEMATICA
ltn[n_]:=Module[{c=Floor[(Sqrt[8*n+1]-1)/2]}, (c(c+1))/2]; nxt[{t_, a_}] := Module[ {m = ltn[t]}, {t + m, m}]; Transpose[NestList[nxt, {1, 1}, 40]] [[2]] (* Harvey P. Dale, Feb 12 2016 *)
PROG
(Haskell)
a061883 n = a061883_list !! n
a061883_list = 1 : zipWith (-) (tail a060985_list) a060985_list
-- Reinhard Zumkeller, Feb 03 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, May 12 2001
STATUS
approved