cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A318609 a(1) = 2, a(2) = 4, a(3) = 6; for n > 3, a(n) = 3*a(n-1) - 3*a(n-2) + 9*a(n-3).

Original entry on oeis.org

2, 4, 6, 24, 90, 252, 702, 2160, 6642, 19764, 58806, 176904, 532170, 1595052, 4780782, 14346720, 43053282, 129146724, 387400806, 1162241784, 3486843450, 10460412252, 31380882462, 94143001680, 282430067922, 847289140884, 2541864234006, 7625595890664, 22876797237930
Offset: 1

Views

Author

Jianing Song, Sep 02 2018

Keywords

Comments

a(n) is the number of solutions to Sum_{i=1..n} x_i^2 == 1 (mod 3).

Examples

			a(5) = 90 since M^5 * [1, 0, 0]^T = [81, 90, 72]^T.
		

Crossrefs

A101990 gives the number of solutions to Sum_{i=1..n} x_i^2 == 0 (mod 3);
A318610 gives the number of solutions to Sum_{i=1..n} x_i^2 == 2 (mod 3).

Programs

  • Magma
    I:=[2,4,6]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+9*Self(n-3): n in [1..30]]; // Jianing Song, Sep 05 2018
  • Mathematica
    LinearRecurrence[{3, -3, 9}, {2, 4, 6}, 30] (* Jianing Song, Sep 05 2018 *)
  • PARI
    Vec(2*x*(1-x)/((1-3*x)*(1+3*x^2)) + O(x^40))
    
  • PARI
    a(n) = ([1, 0, 2 ; 2, 1, 0 ; 0, 2, 1]^n*mattranspose([1, 0, 0]))[2]; \\ Michel Marcus, Dec 20 2019
    

Formula

a(n) = middle term in M^n * [1, 0, 0]^T, where M = the 3 X 3 matrix [1, 0, 2 / 2, 1, 0 / 0, 2, 1] and T denotes transpose. [Edited by Petros Hadjicostas, Dec 19 2019]
O.g.f.: 2*x*(1 - x)/((1 - 3*x)*(1 + 3*x^2)).
E.g.f.: 1/3*(exp(3*x) + 2*cos(sqrt(3)*x - 2*Pi/3)).
a(n) = 3^(n/2 - 1)*((-i)^n*(-1 + sqrt(3)*i)/2 + i^n*(-1 - sqrt(3)*i)/2 + 3^(n/2)), where i is the imaginary unit.
a(n) = 3^(n/2 - 1)*(2*cos(n*Pi/2 - 2*Pi/3) + 3^(n/2)).
a(n) = 3^(n-1) + (-3)^(n/2-1) for even n and 3^(n-1) + (-3)^((n-1)/2) for odd n.
a(n) = a(n-1) + 2*A101990(n-1).
a(n) = A318610(n) for even n and 2*3^(n-1) - A318610(n) for odd n.
a(n) + A101990(n) + A318610(n) = 3^n.

A071304 a(n) = (1/2) * (number of n X n 0..4 matrices M with MM' mod 5 = I, where M' is the transpose of M and I is the n X n identity matrix).

Original entry on oeis.org

1, 4, 120, 14400, 9360000, 29016000000, 457002000000000, 35646156000000000000, 13946558535000000000000000, 27230655539587500000000000000000, 266009466302345390625000000000000000000, 12987912192212013697265625000000000000000000000
Offset: 1

Views

Author

R. H. Hardin, Jun 11 2002

Keywords

Comments

Also, number of n X n orthogonal matrices over GF(5) with determinant 1. - Max Alekseyev, Nov 06 2022

Examples

			From _Petros Hadjicostas_, Dec 17 2019: (Start)
For n = 2, the 2*a(2) = 8 n X n matrices M with elements in {0,1,2,3,4} that satisfy MM' mod 5 = I are the following:
(a) those with 1 = det(M) mod 5:
[[1,0],[0,1]]; [[0,4],[1,0]]; [[0,1],[4,0]]; [[4,0],[0,4]].
These form the abelian group SO(2, Z_5). See the comments for sequence A060968.
(b) those with 4 = det(M) mod 5:
[[0,1],[1,0]]; [[0,4],[4,0]]; [[1,0],[0,4]]; [[4,0],[0,1]].
Note that, for n = 3, we have 2*a(3) = 2*120 = 240 = A264083(5). (End)
		

Crossrefs

Programs

  • PARI
    { a071304(n) = my(t=n\2); prod(i=0, t-1, 5^(2*t)-5^(2*i)) * if(n%2, 5^t, 1/(5^t+1)); } \\ Max Alekseyev, Nov 06 2022

Formula

a(2k+1) = 5^k * Product_{i=0..k-1} (5^(2k) - 5^(2i)); a(2k) = (5^k - 1) * Product_{i=1..k-1} (5^(2k) - 5^(2i)) (see MacWilliams, 1969). - Max Alekseyev, Nov 06 2022
From Petros Hadjicostas, Dec 20 2019: (Start)
Let b(n) be the number of solutions to the equation Sum_{i = 1..n} x_i^2 = 1 (mod 5) with x_i in 0..4. We have that b(n) = 5*b(n-1) + 5*b(n-2) - 25*b(n-3) for n >= 3 with b(0) = 0, b(1) = 2, and b(2) = 4.
We have b(n) = A330607(n, k=1) for n >= 0.
We conjecture that a(n+1) = a(n)*b(n+1) for n >= 1. (End)

Extensions

Terms a(7) onward from Max Alekseyev, Nov 06 2022

A318610 a(1) = 0, a(2) = 4, a(3) = 12; for n > 3, a(n) = 3*a(n-1) - 3*a(n-2) + 9*a(n-3).

Original entry on oeis.org

0, 4, 12, 24, 72, 252, 756, 2160, 6480, 19764, 59292, 176904, 530712, 1595052, 4785156, 14346720, 43040160, 129146724, 387440172, 1162241784, 3486725352, 10460412252, 31381236756, 94143001680, 282429005040, 847289140884, 2541867422652, 7625595890664, 22876787671992
Offset: 1

Views

Author

Jianing Song, Sep 02 2018

Keywords

Comments

a(n) is the number of solutions to Sum_{i=1..n} x_i^2 == 2 (mod 3).

Examples

			a(5) = 72 since M^5 * [1, 0, 0]^T = [81, 90, 72]^T.
		

Crossrefs

A101990 gives the number of solutions to Sum_{i=1..n} x_i^2 == 0 (mod 3);
A318609 gives the number of solutions to Sum_{i=1..n} x_i^2 == 1 (mod 3).

Programs

  • Magma
    I:=[0,4,12]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+9*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Sep 04 2018
  • Mathematica
    LinearRecurrence[{3, -3, 9}, {0, 4, 12}, 30] (* Vincenzo Librandi, Sep 04 2018 *)
  • PARI
    concat([0], Vec(4*x^2/((1-3*x)*(1+3*x^2)) + O(x^40)))
    
  • PARI
    a(n) = ([1, 0, 2 ; 2, 1, 0 ; 0, 2, 1]^n*mattranspose([1, 0, 0]))[3]; \\ Michel Marcus, Dec 20 2019
    

Formula

a(n) = last term in M^n * [1, 0, 0]^T, where M = the 3 X 3 matrix [1, 0, 2 / 2, 1, 0 / 0, 2, 1] and T denotes transpose. [Edited by Petros Hadjicostas, Dec 19 2019]
O.g.f.: 4*x^2/((1 - 3x)*(1 + 3*x^2)).
E.g.f.: 1/3*(exp(3*x) + 2*cos(sqrt(3)*x + 2*Pi/3)).
a(n) = 3^(n/2 - 1)*((-i)^n*(-1 - sqrt(3)*i)/2 + i^n*(-1 + sqrt(3)*i)/2 + 3^(n/2)), where i is the imaginary unit.
a(n) = 3^(n/2 - 1)*(2*cos(n*Pi/2 + 2*Pi/3) + 3^(n/2)).
a(n) = 3^(n-1) + (-3)^(n/2-1) for even n and 3^(n-1) - (-3)^((n-1)/2) for odd n.
a(n) = a(n-1) + 2*A318609(n-1).
a(n) = A318609(n) for even n and 2*3^(n-1) - A318609(n) for odd n.
a(n) + A101990(n) + A318609(n) = 3^n.

A229136 Number of solutions to Sum_{i=1..n} x_i^2 == 1 (mod 4) with x_i in 0..3.

Original entry on oeis.org

2, 8, 24, 64, 192, 768, 3584, 16384, 69632, 278528, 1081344, 4194304, 16515072, 66060288, 266338304, 1073741824, 4311744512, 17246978048, 68853694464, 274877906944, 1098437885952, 4393751543808, 17583596109824, 70368744177664, 281543696187392, 1126174784749568
Offset: 1

Views

Author

Keywords

Comments

Conjecture: a(n) = A131885(n)*2^(n-1) for n >= 1. [Corrected by Petros Hadjicostas, Dec 20 2019]
From Petros Hadjicostas, Dec 20 2019: (Start)
Since this sequence is column k = 1 of A330619, we have a(n) = 4*a(n-1) - 8*a(n-2) + 2^(2*n-3) for n >= 3. (This follows from the theory developed in A330619.) If we let b(n) = a(n)/2^(n-1) for n >= 1, we get b(n) = 2*b(n-1) - 2*b(n-2) + 2^(n-2) for n >= 3.
It follows that 2*b(n-1) = 4*b(n-2) - 4*b(n-3) + 2^(n-2) for n >= 4. Subtracting the last equation from the previous one, we get (after some algebra) b(n) = 4*b(n-1) - 6*b(n-2) + 4*b(n-3) for n >= 4. We can easily verify that b(1) = 2, b(2) = 4, and b(3) = 6, and this proves that b(n) = A131885(n) for n >= 1. This proves the above conjecture. (End)

Crossrefs

Programs

  • Mathematica
    a[1] = 2; a[2] = 8; a[3] = 24; a[n_] := a[n-1]*8 + a[n-2]*(-24) + 32*a[n - 3]; Table[a[n], {n, 15}]
  • PARI
    Vec(-2*x*(2*x-1)^2/((4*x-1)*(8*x^2-4*x+1)) + O(x^100)) \\ Colin Barker, Nov 10 2014

Formula

G.f.: 1/(1 - 4*x) + Q(0)/(2 - 4*x), where Q(k) = 1 + 1/(1 - 2*x*(k+1)/(2*x*(k+2) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 27 2013
G.f.: -2*x*(2*x - 1)^2 / ((4*x - 1)*(8*x^2 - 4*x + 1)). - Colin Barker, Nov 10 2014
a(n) = 4*a(n-1) - 8*a(n-2) + 2^(2*n-3) for n >= 3. - Petros Hadjicostas, Dec 20 2019

A229138 Number of solutions to Sum_{i=1...n} x_i^2 == 1 (mod 8) with x_i in 0..7.

Original entry on oeis.org

4, 16, 96, 512, 2560, 24576, 229376, 2097152, 17956864, 142606336, 1107296256, 8589934592, 67612180480, 541165879296, 4363686772736, 35184372088832, 282583078273024, 2260595906707456, 18049582881570816, 144115188075855872, 1151793405676748800
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 4*x*(1 -12*x +56*x^2 -128*x^3 +128*x^4 -1024*x^5 +2048*x^6)/((1-8*x)*(1+256*x^4)*(1-8*x+32*x^2)) )); // G. C. Greubel, Dec 21 2019
    
  • Maple
    seq(coeff(series(4*x*(1 -12*x +56*x^2 -128*x^3 +128*x^4 -1024*x^5 +2048*x^6)/( (1-8*x)*(1+256*x^4)*(1-8*x+32*x^2)), x, n+1), x, n), n = 1..30); # G. C. Greubel, Dec 21 2019
  • Mathematica
    a[n_]:= a[n]= 16a[n-1] -96a[n-2] +256a[n-3] -256a[n-4] +4096a[n-5] -24576 a[n-6] +65536 a[n-7]; Do[a[i]={4, 16, 96, 512, 2560, 24576, 229376}[[i]], {i,7}]; Array[a, 33]
  • PARI
    Vec(4*x*(1-12*x+56*x^2-128*x^3+128*x^4-1024*x^5+2048*x^6)/((1-8*x)*(1+256*x^4)*(1-8*x+32*x^2)) + O(x^30)) \\ Colin Barker, Nov 10 2014
    
  • Sage
    def A229138_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 4*x*(1 -12*x +56*x^2 -128*x^3 +128*x^4 -1024*x^5 +2048*x^6)/( (1-8*x)*(1+256*x^4)*(1-8*x+32*x^2)) ).list()
    a=A229138_list(30); a[1:] # G. C. Greubel, Dec 21 2019

Formula

G.f.: 4*x*(1 -12*x +56*x^2 -128*x^3 +128*x^4 -1024*x^5 +2048*x^6)/((1-8*x)*(1+256*x^4)*(1-8*x+32*x^2)). - Colin Barker, Nov 10 2014

A330619 Array read by rows: T(n,k) is the number of solutions to the equation Sum_{i=1..n} x_i^2 == k (mod 4) with x_i in 0..3, where n >= 0 and 0 <= k <= 3.

Original entry on oeis.org

1, 0, 0, 0, 2, 2, 0, 0, 4, 8, 4, 0, 8, 24, 24, 8, 32, 64, 96, 64, 192, 192, 320, 320, 1024, 768, 1024, 1280, 4608, 3584, 3584, 4608, 18432, 16384, 14336, 16384, 69632, 69632, 61440, 61440, 262144, 278528, 262144, 245760, 1015808, 1081344, 1081344, 1015808, 4063232, 4194304, 4325376, 4194304
Offset: 0

Views

Author

Petros Hadjicostas, Dec 20 2019

Keywords

Comments

Let v(n) = [T(n,0), T(n,1), T(n,2), T(n,3)]' for n >= 0, where ' denotes transpose, and M = [[2,0,0,2], [2,2,0,0], [0,2,2,0], [0,0,2,2]]. We claim that v(n+1) = M*v(n) for n >= 0.
To see why this is the case, let j in 0..3, and consider the expressions 0^2 + j, 1^2 + j, 2^2 + j, and 3^2 + j modulo 4. It can be easily proved that these four numbers contain M[0,j] 0's, M[1,j] 1's, M[2,j] 2's, and M[3,j] 3's. (This is how the transfer matrix M was constructed. The idea is similar to Jianing Song's ideas for sequences A101990, A318609, and A318610.)
It follows that v(n) = M^n * v(0), where v(0) = [1,0,0,0]'.
The minimal polynomial for M is z*(z - 4)*(z^2 - 4*z + 8) = z^4 - 8*z^3 + 24*z^2 - 32*z. Thus, M^4 - 8*M^3 + 24*M^2 - 32*M = 0, and so M^n*v(0) - 8*M^(n-1)*v(0) + 24*M^(n-2)*v(0) - 32*M^(n-3)*v(0) = 0 for n >= 4. This implies v(n) - 8*v(n-1) + 24*v(n-2) - 32*v(n-3) = 0 for n >= 4. Hence each sequence (T(n,k): n >= 0) satisfies the same recurrence b(n) - 8*b(n-1) + 24*b(n-2) - 32*b(n-3) = 0 for n >= 4. (For all k in 0..3, the recurrence is not satisfied for n = 3.)
Clearly, for each k in 0..3, we may find constants c_k, d_k, e_k such that T(n,k) = c_k*(2 + 2*i)^n + d_k*(2 - 2*i)^n + e_k*4^n for n >= 0 (where i = sqrt(-1)). We omit the details.

Examples

			Array T(n,k) (with rows n >= 0 and columns 0 <= k <= 3) begins as follows:
     1,    0,    0,    0;
     2,    2,    0,    0;
     4,    8,    4,    0;
     8,   24,   24,    8;
    32,   64,   96,   64;
   192,  192,  320,  320;
  1024,  768, 1024, 1280;
  4608, 3584, 3584, 4608;
  ...
T(n=2,k=0) = 4 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 0 (mod 4) (with x_1, x_2 in 0..3): (0,0), (0,2), (2,0), and (2,2).
T(n=2,k=1) = 8 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 1 (mod 4) (with x_1, x_2 in 0..3): (0,1), (0,3), (1,0), (1,2), (2,1), (2,3), (3,0), and (3,2).
T(n=2,k=2) = 4 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 2 (mod 4) (with x_1, x_2 in 0..3): (1,1), (1,3), (3,1), and (3,3).
T(n=2,k=3) = 0 because we have no solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 3 (mod 4) (with x_1, x_2 in 0..3).
		

Crossrefs

Columns include A228920 (k = 0), A229136 (k = 1).

Programs

  • Maple
    with(LinearAlgebra);
    v := proc(n) local M, v0;
      M := Matrix([[2, 0, 0, 2], [2, 2, 0, 0], [0, 2, 2, 0], [0, 0, 2, 2]]);
      v0 := Matrix([[1], [0], [0], [0]]); if n = 0 then v0; else  MatrixMatrixMultiply(MatrixPower(M, n), v0); end if;
    end proc;
    seq(seq(v(n)[k, 1], k = 1 .. 4), n = 0 .. 10);
  • PARI
    a(n) = ([2,0,0,2; 2,2,0,0; 0,2,2,0; 0,0,2,2]^n*mattranspose([1, 0, 0, 0]));
    for(n=0, 30, print1(a(n), ", "));  /* after Michel Marcus's program for A101990 */
    
  • PARI
    Vec((1 - 2*x^4 + 2*x^5)*(1 - 4*x^4 + 4*x^8 + 4*x^10) / ((1 - 2*x^2)*(1 + 2*x^2)*(1 - 4*x^4 + 8*x^8)) + O(x^50)) \\ Colin Barker, Dec 21 2019

Formula

T(n,k) = 8*T(n-1,k) - 24*T(n-2,k) + 32*T(n-3,k) for n >= 4 with initial conditions for T(1,k), T(2,k), and T(3,k) (for each value of k in 0..3) given in the example below. (The recurrence is not true for n = 3.)
T(n,k) = 4*T(n-1,k) - 8*T(n-2,k) + 2^(2*n-3) for n >= 3.
T(n,k) ~ 4^(n-1) for each k in 0..3.
Sum_{k = 0..3} T(n,k) = 4^n.
v(n+1) = M*v(n) and v(n) = M^n * [1,0,0,0]' for n >= 0, where M = [[2,0,0,2], [2,2,0,0], [0,2,2,0], [0,0,2,2]] and v(n) = [T(n,0), T(n,1), T(n,2), T(n,3)]'.
From Colin Barker, Dec 21 2019: (Start)
If we consider this array as a single sequence (a(n): n >= 0), then:
G.f.: (1 - 2*x^4 + 2*x^5)*(1 - 4*x^4 + 4*x^8 + 4*x^10) / ((1 - 2*x^2)*(1 + 2*x^2)*(1 - 4*x^4 + 8*x^8)).
a(n) = 8*a(n-4) - 24*a(n-8) + 32*a(n-12) for n > 15. (End)

A330635 Array read by rows: T(n,k) is the number of solutions to the equation Sum_{i=1..n} x_i^2 == k (mod 6) with x_i in 0..5, where n >= 0 and 0 <= k <= 5.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 2, 0, 1, 2, 0, 2, 8, 8, 2, 8, 8, 36, 24, 48, 36, 24, 48, 264, 192, 192, 264, 192, 192, 1296, 1440, 1152, 1296, 1440, 1152, 7200, 8064, 8064, 7200, 8064, 8064, 46656, 44928, 48384, 46656, 44928, 48384, 286848, 276480, 276480, 286848, 276480, 276480
Offset: 0

Views

Author

Petros Hadjicostas, Dec 21 2019

Keywords

Comments

Let v(n) = [T(n,0), T(n,1), T(n,2), T(n,3), T(n,4), T(n,5)]' for n >= 0, where ' denotes transpose, and M = [[1, 0, 2, 1, 0, 2], [2, 1, 0, 2, 1, 0], [0, 2, 1, 0, 2, 1], [1, 0, 2, 1, 0, 2], [2, 1, 0, 2, 1, 0], [0, 2, 1, 0, 2, 1]]. We claim that v(n+1) = M*v(n) for n >= 0.
To see why this is the case, let j in 0..5, and consider the expressions 0^2 + j, 1^2 + j, 2^2 + j, 3^2 + j, 4^2 + j, and 5^2 + j modulo 6. It can be easily proved that these six numbers contain M[0,j] 0's, M[1,j] 1's, M[2,j] 2's, M[3,j] 3's, M[4,j] 4's, and M[5,j] 5's. (This is how the transfer matrix M was constructed. The idea is similar to Jianing Song's ideas for sequences A101990, A318609, and A318610.)
It follows that v(n) = M^n * v(0), where v(0) = [1,0,0,0,0,0]'.
The minimal polynomial for M is z*(z - 6)*(z^2 + 12) = z^4 - 6*z^3 + 12*z^2 - 72*z. Thus, M^4 - 6*M^3 + 12*M^2 - 72*M = 0, and so M^n*v(0) - 6*M^(n-1)*v(0) + 12*M^(n-2)*v(0) - 72*M^(n-3)*v(0) = 0 for n >= 4. This implies v(n) - 6*v(n-1) + 12*v(n-2) - 72*v(n-3) = 0 for n >= 4. Hence each sequence (T(n,k): n >= 0) satisfies the same recurrence b(n) - 6*b(n-1) + 12*b(n-2) - 72*b(n-3) = 0 for n >= 4.
Clearly, for each k in 0..5, we may find constants c_k, d_k, e_k such that T(n,k) = c_k*(2*sqrt(3)*i)^n + d_k*(-2*sqrt(3)*i)^n + e_k*6^n for n >= 0, where i = sqrt(-1). We omit the details.

Examples

			Array T(n,k) (with rows n >= 0 and columns 0 <= k <= 5) begins as follows:
     1,    0,    0,    0,    0,    0;
     1,    2,    0,    1,    2,    0;
     2,    8,    8,    2,    8,    8;
    36,   24,   48,   36,   24,   48;
   264,  192,  192,  264,  192,  192;
  1296, 1440, 1152, 1296, 1440, 1152;
  7200, 8064, 8064, 7200, 8064, 8064;
  ...
T(n=2,k=0) = 2 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 0 (mod 6) (with x_1, x_2 in 0..5): (0,0) and (3,3).
T(n=2,k=1) = 8 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 1 (mod 6) (with x_1, x_2 in 0..5): (0,1), (0,5), (1,0), (2,3), (3,2), (3,4), (4,3), and (5,0).
T(n=2,k=2) = 8 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 2 (mod 6) (with x_1, x_2 in 0..5): (1,1), (1,5), (2,2), (2,4), (4,2), (4,4), (5,1), and (5,5).
T(n=2,k=3) = 2 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 3 (mod 6) (with x_1, x_2 in 0..5): (0,3) and (3,0).
T(n=2,k=4) = 8 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 4 (mod 6) (with x_1, x_2 in 0..5): (0,2), (0,4), (1,3), (2,0), (3,1), (3,5), (4,0), and (5,3).
T(n=2,k=5) = 8 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 5 (mod 6) (with x_1, x_2 in 0..5): (1,2), (1,4), (2,1), (2,5), (4,1), (4,5), (5,2), and (5,4).
		

Crossrefs

Programs

  • Maple
    with(LinearAlgebra);
    v := proc(n) local M, v0;
       M := Matrix([[1,0,2,1,0,2],[2,1,0,2,1,0],[0,2,1,0,2,1],[1,0,2,1,0,2],[2,1,0,2,1,0],[0,2,1,0,2,1]]);
       v0 := Matrix([[1], [0], [0], [0], [0], [0]]);
       if n = 0 then v0; else MatrixMatrixMultiply(MatrixPower(M, n), v0); end if;
    end proc;
    seq(seq(v(n)[k, 1], k = 1..6), n = 0..10);
  • PARI
    Vec((1 - 5*x^6 + 2*x^7 + x^9 + 2*x^10 + 8*x^12 - 4*x^13 + 8*x^14 - 4*x^15 - 4*x^16 + 8*x^17 - 36*x^18 + 36*x^21) / ((1 - 6*x^6)*(1 + 12*x^12)) + O(x^60)) \\ Colin Barker, Jan 17 2020

Formula

T(n,k) = T(n, k+3) for k = 0,1,2 and n >= 0.
T(n,k) = 6*T(n-1,k) - 12*T(n-2,k) + 72*T(n-3,k) for n >= 4 and each k in 0..5. (This is not true for k = 0 or 3 when n = 3 because of the presence of z in the minimal polynomial for M.)
Sum_{k=0..5} T(n,k) = 6^n.
T(n,k) = -12*T(n-2,k) + 8*6^(n-2) for n >= 3 and k = 0..5.
T(n,k) ~ 6^(n-1) for each k in 0..5.
From Colin Barker, Jan 12 2020: (Start)
If we consider this array as a single sequence (a(n): n >= 0), then:
a(n) = 6*a(n-6) - 12*a(n-12) + 72*a(n-18) for n > 21.
G.f.: (1 - 5*x^6 + 2*x^7 + x^9 + 2*x^10 + 8*x^12 - 4*x^13 + 8*x^14 - 4*x^15 - 4*x^16 + 8*x^17 - 36*x^18 + 36*x^21) / ((1 - 6*x^6)*(1 + 12*x^12)).
(End)
Showing 1-7 of 7 results.