OFFSET
1,1
FORMULA
It appears that a(n)=2*(3^(3*k-1))-1 if n=4k, a(n)=3^(3*k+1)-1 if n=4k+1, a(n)=2*(3^(3*k+1)) if n=4k+2 and a(n)=3^(3*k+2) if n=4k+3.
From the above would follow that sequence has a rational g.f.
Empirical g.f.: 2*x*(50*x^6-100*x^5+90*x^4+20*x^3+41*x^2+9*x+1) / ((x-1)*(x^2+1)*(1000*x^4-1)). - Colin Barker, Nov 06 2014
EXAMPLE
Sum[d(k), k=1..6](base 3) = (0.1+0.2+0.10+0.11+0.12+0.20)(base 3)=10.0 (base 3)=3 (base 10), hence 6 is in the sequence.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
John W. Layman, Jun 09 2005
STATUS
approved