OFFSET
1,3
EXAMPLE
2^4=16={1,2,1} (base 3) ==> a(4)=(1+2+1)/2 =2
MATHEMATICA
a[n_] := 1/2* Module[{aux = IntegerDigits[2^n, 3]}, Sum[aux[[i]], {i, 1, Length[aux]}]]; Table[a[n], {n, 100}]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
José María Grau Ribas, Apr 02 2010
STATUS
approved