OFFSET
0,3
EXAMPLE
a(5) = 36 = 0 + 1 + 2 + 10 + 11 + 12.
MATHEMATICA
f[n_] := Apply[Plus, Table[ FromDigits[ IntegerDigits[i, 3]], {i, 0, n}]]; Table[ f@n, {n, 0, 45}] (* Robert G. Wilson v Sep 10 2006 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, Sep 08 2006
STATUS
approved