A112367 a(n) = A000217(n-k), where k is the largest triangular number less than n.
0, 0, 1, 0, 1, 3, 0, 1, 3, 6, 0, 1, 3, 6, 10, 0, 1, 3, 6, 10, 15, 0, 1, 3, 6, 10, 15, 21, 0, 1, 3, 6, 10, 15, 21, 28, 0, 1, 3, 6, 10, 15, 21, 28, 36, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 0, 1, 3, 6, 10
Offset: 0
Examples
a(9) = T(9-6) = T(3) = 6. 6 < 9 < 10.
Programs
-
Maple
A112367 := proc(n) t := A057944(n) ; A000217(n-t) ; end proc: seq(A112367(n),n=0..80) ; # R. J. Mathar, Nov 05 2011
-
Mathematica
trn[n_]:=Module[{c=Floor[(Sqrt[8n+1]-1)/2],x},x=n-(c(c+1))/2;(x(x+1))/2]; Array[trn,80,0] (* Harvey P. Dale, Jul 19 2012 *)