login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Base 8 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1.
1

%I #31 Sep 08 2022 08:44:51

%S 1,8,65,521,4168,33345,266761,2134088,17072705,136581641,1092653128,

%T 8741225025,69929800201,559438401608,4475507212865,35804057702921,

%U 286432461623368,2291459692986945,18331677543895561,146653420351164488,1173227362809315905,9385818902474527241

%N Base 8 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1.

%H <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (8,0,1,-8).

%F a(n) = 8*a(n-1) + a(n-3) - 8*a(n-4).

%F a(n) = floor( (65/511)*8^n ). - _Tani Akinari_, Jul 15 2014

%F G.f.: x*(x^2+1) / ((x-1)*(8*x-1)*(x^2+x+1)). - _Colin Barker_, Jul 17 2014

%e The first six terms have base 8 representations 1, 10, 101, 1011, 10110, 101101.

%p A033126 := proc(n)

%p coeftayl( x*(x^2+1) / ((x-1)*(8*x-1)*(x^2+x+1)), x=0, n) ;

%p end proc:

%p seq(A033126(n), n=1..30); # _Wesley Ivan Hurt_, Jul 17 2014

%t CoefficientList[Series[(x^2 + 1)/((x - 1)*(8*x - 1)*(x^2 + x + 1)), {x, 0, 30}], x] (* _Wesley Ivan Hurt_, Jul 17 2014 *)

%t Table[FromDigits[PadRight[{},n,{1,0,1}],8],{n,30}] (* or *) LinearRecurrence[ {8,0,1,-8},{1,8,65,521},30] (* _Harvey P. Dale_, Sep 14 2016 *)

%o (PARI) a(n)=(65*8^n)\511; \\ _Michel Marcus_, Jul 16 2014

%o (Magma) [Floor( (65/511)*8^n ) : n in [1..30]]; // _Wesley Ivan Hurt_, Jul 17 2014

%Y Cf. A033128 (similar in base 10).

%K nonn,base,easy

%O 1,2

%A _Clark Kimberling_

%E More terms from _Michel Marcus_, Jul 16 2014