|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 8*a(n-1) + a(n-3) - 8*a(n-4).
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
|
coeftayl( x*(x^2+1) / ((x-1)*(8*x-1)*(x^2+x+1)), x=0, n) ;
end proc:
|
|
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
|
(Magma) [Floor( (65/511)*8^n ) : n in [1..30]]; // Wesley Ivan Hurt, Jul 17 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|