login
a(n) = A000217(n-k), where k is the largest triangular number less than n.
2

%I #9 Aug 09 2015 00:50:44

%S 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,

%T 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,

%U 6,10,15,21,28,36,45,55,0,1,3,6,10

%N a(n) = A000217(n-k), where k is the largest triangular number less than n.

%F a(n) = A000217(n-A057944(n)). - _R. J. Mathar_, Nov 05 2011

%e a(9) = T(9-6) = T(3) = 6. 6 < 9 < 10.

%p A112367 := proc(n)

%p t := A057944(n) ;

%p A000217(n-t) ;

%p end proc:

%p seq(A112367(n),n=0..80) ; # _R. J. Mathar_, Nov 05 2011

%t 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 *)

%K easy,nonn

%O 0,6

%A _Amarnath Murthy_, Sep 12 2005