OFFSET
1,4
FORMULA
a(3^k)=(9^k-1)/8
PROG
(PARI) a(n)=sum(k=1, n, -sum(i=1, k-1, (-1)^i*3^valuation(i, 3)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, May 03 2004
STATUS
approved