OFFSET
0,3
LINKS
N. J. A. Sloane and J. A. Sellers, On non-squashing partitions, Discrete Math., 294 (2005), 259-274.
MAPLE
S := 3; f := proc(n) global S; option remember; if n=0 then RETURN(0); fi; if n mod 2 = 0 then RETURN(S*f(n/2)); else f((n-1)/2)+1; fi; end;
MATHEMATICA
a[0] = 0; a[n_] := a[n] = If[EvenQ[n], 3*a[n/2], a[(n - 1)/2] + 1];
Table[a[n], {n, 0, 73}] (* Jean-François Alcover, Jan 18 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 14 2003
STATUS
approved