%I #10 Jun 13 2015 00:49:16
%S 1,5,17,52,158,476,1429,4289,12869,38608,115826,347480,1042441,
%T 3127325,9381977,28145932,84437798,253313396,759940189,2279820569,
%U 6839461709,20518385128,61555155386,184665466160,553996398481
%N Base-3 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,2.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,1,-3).
%F G.f.: x*(1+2*x+2*x^2) / ( (x-1)*(3*x-1)*(1+x+x^2) ). - _R. J. Mathar_, Apr 30 2015
%t nn=40;With[{c=PadRight[{},nn,{1,2,2}]},Table[FromDigits[Take[c,n],3],{n,nn}]] (* _Harvey P. Dale_, Jul 15 2012 *)
%K nonn,base,easy
%O 1,2
%A _Clark Kimberling_