OFFSET
0,3
LINKS
Sung-Hyuk Cha, On Integer Sequences Derived from Balanced k-ary Trees, Applied Mathematics in Electrical and Computer Engineering, 2012. - From N. J. A. Sloane, Jun 12 2012
Sung-Hyuk Cha, On Complete and Size Balanced k-ary Tree Integer Sequences, International Journal of Applied Mathematics and Informatics, Issue 2, Volume 6, 2012, pp. 67-75. - From N. J. A. Sloane, Dec 24 2012
FORMULA
a(n) - n = a( [(n+1)/3] ).
MATHEMATICA
s[n_] := Plus @@ IntegerDigits[n, 3]; a[n_] := (3*n + s[3*n] - s[6*n])/2; Array[a, 100, 0] (* Amiram Eldar, Feb 21 2021 *)
PROG
(PARI) a(n) = valuation((6*n)!, 3) - valuation((3*n)!, 3); \\ Michel Marcus, Jul 29 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 02 2007
STATUS
approved