Try These
T(0) => 0;
T(n) => n + T(n-1);
S(1) => 0;
S(n) => 1 + S(
‘
n/2
ž
);