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”).

A033126
Base 8 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1.
1
1, 8, 65, 521, 4168, 33345, 266761, 2134088, 17072705, 136581641, 1092653128, 8741225025, 69929800201, 559438401608, 4475507212865, 35804057702921, 286432461623368, 2291459692986945, 18331677543895561, 146653420351164488, 1173227362809315905, 9385818902474527241
OFFSET
1,2
FORMULA
a(n) = 8*a(n-1) + a(n-3) - 8*a(n-4).
a(n) = floor( (65/511)*8^n ). - Tani Akinari, Jul 15 2014
G.f.: x*(x^2+1) / ((x-1)*(8*x-1)*(x^2+x+1)). - Colin Barker, Jul 17 2014
EXAMPLE
The first six terms have base 8 representations 1, 10, 101, 1011, 10110, 101101.
MAPLE
A033126 := proc(n)
coeftayl( x*(x^2+1) / ((x-1)*(8*x-1)*(x^2+x+1)), x=0, n) ;
end proc:
seq(A033126(n), n=1..30); # Wesley Ivan Hurt, Jul 17 2014
MATHEMATICA
CoefficientList[Series[(x^2 + 1)/((x - 1)*(8*x - 1)*(x^2 + x + 1)), {x, 0, 30}], x] (* Wesley Ivan Hurt, Jul 17 2014 *)
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 *)
PROG
(PARI) a(n)=(65*8^n)\511; \\ Michel Marcus, Jul 16 2014
(Magma) [Floor( (65/511)*8^n ) : n in [1..30]]; // Wesley Ivan Hurt, Jul 17 2014
CROSSREFS
Cf. A033128 (similar in base 10).
Sequence in context: A317600 A288788 A033118 * A022039 A041025 A163459
KEYWORD
nonn,base,easy
EXTENSIONS
More terms from Michel Marcus, Jul 16 2014
STATUS
approved