OFFSET
0,1
COMMENTS
The restriction to {1,...,127} is a permutation of that set. The same is true for the sequence obtained from any other starting value a(0) in this set, and for companion matrices associated to any polynomial whose coefficients mod 2 are the binary representation of 3,9,15,17,29,39,43,57,63,65,75,83,85,101,111,113,119 or 125 = 127-2 (the present case). - M. F. Hasler, Nov 13 2010
The terms represent vectors v[n] = binary(a(n)) in (Z/2Z)^7, encoded as 7-bit integers (lsb first), i.e. binary(a(n+1)) = M.binary(a(n)) (mod 2), with the matrix M given below. (Thus the sign of the entries of M has no incidence on the terms of the sequence.) The sequence is periodic with period 127, i.e. a(n+127)=a(n) for all n. - M. F. Hasler, Nov 13 2010
LINKS
Wikipedia, Companion matrix.
FORMULA
a(n) = [1,2,4,8,16,32,64].(M^n.v % 2), where % denotes the binary remainder operation, v=(1, 1, 1, 1, 1, 0, 1)^T (column vector) and M is described below. [M. F. Hasler, Nov 13 2010]
MATHEMATICA
F = {{0, 1, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 1},
{-1, 0, -1, -1, -1, -1, -1}};
f[x_] = CharacteristicPolynomial[F, x];
v[0] = IntegerDigits[-f[2] - 128, 2];
a = Table[Sum[Mod[v[n][[m]], 2]*2^(m - 1), {m, 1, 7}], {n, 0, 100}]
PROG
(PARI) a(n)={ vector(7, i, 1<<i)\2* lift( Mod( matrix( 7, 7, i, j, (j==i+1)-(i==7 & j!=2)), 2)^(n%127)*vector(7, i, i!=6)~)} \\ M. F. Hasler, Nov 13 2010
CROSSREFS
KEYWORD
nonn,uned
AUTHOR
STATUS
approved