OFFSET
1,2
COMMENTS
Consider the matrix A = [1, 2; 3, 4]. Then the sequence gives a(1) = A_{1,1} = A_11, a(2) = A_12, a(3) = A_21, a(4) = A_22, a(5)=(A^2)_11, a(6)=(A^2)_12, a(7)=(A^2)_21, a(8)=(A^2)_22, a(9)=(A^3)_11, a(10)=(A^3)_12, ...
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 5, 0, 0, 0, 2).
FORMULA
a(4n-3) = A124610(n), a(4n-2) = 2 A015535(n), a(4n-1) = 3 A015535(n), a(4n) = a(4n-3) + a(4n-1). - M. F. Hasler, Dec 01 2008
a(n) = 5*a(n-4)+2*a(n-8). a(4n+1)=A124610(n+1), n>=0. G.f.: x*(1+2x+3x^2+4x^3+2x^4+2x^7) / (1-5x^4-2x^8). - R. J. Mathar, Dec 04 2008
MAPLE
a:= proc(n) local r, m; (<<1|2>, <3|4>>^iquo(n+3, 4, 'r'))[iquo(r+2, 2, 'm'), m+1] end: seq(a(n), n=1..50); # Alois P. Heinz, Dec 01 2008
MATHEMATICA
LinearRecurrence[{0, 0, 0, 5, 0, 0, 0, 2}, {1, 2, 3, 4, 7, 10, 15, 22}, 50] (* Jean-François Alcover, May 18 2018, after R. J. Mathar *)
PROG
(PARI) A100638(n)=([1, 2; 3, 4]^((n-1)\4+1))[(n-1)%4\2+1, 2-n%2] /* M. F. Hasler, Dec 01 2008 */
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Simone Severini, Dec 04 2004
EXTENSIONS
STATUS
approved