OFFSET
0,3
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = f(n,0,0) with f(n,m,k) = if n=0 then k else if k<(3^(m+1)-1)/2 then f(n-1,m,k+1) else f(n-1,m+1,3^(m+1)).
G.f.: x/(1-x)^2 + (1-x)^(-1)*Sum_{j>=1} ((3^j-1)/2) * x^(3/4 + 3^j/2 + j/2). - Robert Israel, Dec 14 2015
MAPLE
0, seq($3^(d-1)..floor(3^d/2), d=0..5); # Robert Israel, Dec 14 2015
MATHEMATICA
f[n_, m_, k_] := If[n == 0, k, If[k < (3^(m + 1) - 1)/2, f[n - 1, m, k + 1], f[n - 1, m + 1, 3^(m + 1)]]]; Table[f[n, 0, 0], {n, 0, 63}] (* L. Edson Jeffery, Dec 10 2015 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Oct 19 2007
STATUS
approved