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.

A071303 1/2 times the number of n X n 0..3 matrices M with MM' mod 4 = I, where M' is the transpose of M and I is the n X n identity matrix.

Original entry on oeis.org

1, 8, 192, 12288, 1966080, 1509949440, 5411658792960
Offset: 1

Views

Author

R. H. Hardin, Jun 11 2002

Keywords

Comments

It seems that a(n) = n! * 2^(binomial(n+1,2) - 1) for n = 1, 2, 3, 4, 5, while for n = 6, a(n) is twice this number. The number n! * 2^(binomial(n+1,2) - 1) appears in Proposition 6.1 in Eriksson and Linusson (2000) as an upper bound to the number of three-dimensional permutation arrays of size n (see column k = 3 of A330490). - Petros Hadjicostas, Dec 16 2019
a(7) = 7! * 2^30. - Sean A. Irvine, Jul 11 2024

Examples

			From _Petros Hadjicostas_, Dec 16 2019: (Start)
For n = 2, here are the 2*a(2) = 16 2 x 2 matrices M with elements in {0,1,2,3} that satisfy MM'  mod 4 = I:
(a) With 1 = det(M) mod 4:
  [[1,0],[0,1]]; [[0,1],[3,0]]; [[0,3],[1,0]]; [[1,2],[2,1]];
  [[2,1],[3,2]]; [[2,3],[1,2]]; [[3,0],[0,3]]; [[3,2],[2,3]].
These form the abelian group SO(2, Z_n). See the comments for sequence A060968.
(b) With 3 = det(M) mod 4:
  [[0,1],[1,0]]; [[0,3],[3,0]]; [[1,0],[0,3]];  [[1,2],[2,3]];
  [[2,1],[1,2]]; [[2,3],[3,2]]; [[3,0],[0,1]];  [[3,2],[2,1]].
Note that, for n = 3, we have 2*a(3) = 2*192 = 384 = A264083(4). (End)
		

Crossrefs

Extensions

a(7) from Sean A. Irvine, Jul 11 2024

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

Original entry on oeis.org

2, 4, 8, 32, 192, 1024, 4608, 18432, 69632, 262144, 1015808, 4063232, 16515072, 67108864, 270532608, 1082130432, 4311744512, 17179869184, 68585259008, 274341036032, 1098437885952, 4398046511104, 17600775979008, 70403103916032, 281543696187392
Offset: 1

Views

Author

Keywords

Crossrefs

Column k = 0 of A330619.

Programs

  • Mathematica
    Table[((2 + 2I)^n + (2 - 2I)^n + 4^n)/4, {n, 1, 30}]
  • PARI
    a(n)=((2+2*I)^n+(2-2*I)^n+4^n)/4 \\ Charles R Greathouse IV, Sep 15 2013
    
  • PARI
    Vec(-2*x*(12*x^2-6*x+1)/((4*x-1)*(8*x^2-4*x+1)) + O(x^100)) \\ Colin Barker, Nov 10 2014

Formula

a(n) = ((2+2i)^n + (2-2i)^n + 4^n)/4. - Charles R Greathouse IV, Sep 15 2013
G.f.: -2*x*(12*x^2-6*x+1) / ((4*x-1)*(8*x^2-4*x+1)). - Colin Barker, Nov 10 2014

Extensions

a(13)-a(25) from Charles R Greathouse IV, Sep 15 2013

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

Original entry on oeis.org

2, 8, 32, 128, 3072, 32768, 294912, 2392064, 17825792, 134217728, 1040187392, 8313110528, 67645734912, 549755813888, 4432406249472, 35461397479424, 282574488338432, 2251799813685248, 17979214137393152, 143833163343331328, 1151795604700004352, 9223372036854775808
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:= a[n]=16 a[n-1]-96 a[n-2] + 256 a[n-3]-256 a[n-4]+4096a[n-5]-24576a[n-6]+ 65536 a[n-7];Do[a[i] = {2, 8, 32, 128, 3072, 32768, 294912}[[i]], {i, 1, 7}];Array[a,33]
  • PARI
    a(n)=my(v=vector(8,i,i==1)); for(i=1,n,v+=[2*v[8]+v[5], 2*v[1]+v[6], 2*v[2]+v[7], 2*v[3]+v[8], 2*v[4]+v[1], 2*v[5]+v[2], 2*v[6]+v[3], 2*v[7]+v[4]]); v[1]<Charles R Greathouse IV, Sep 15 2013
    
  • PARI
    Vec(-2*x*(28672*x^6-9216*x^5+1280*x^4-64*x^3+48*x^2-12*x+1)/((8*x-1)*(32*x^2-8*x+1)*(256*x^4+1)) + O(x^100)) \\ Colin Barker, Nov 10 2014

Formula

G.f.: -2*x*(28672*x^6-9216*x^5+1280*x^4-64*x^3+48*x^2-12*x+1) / ((8*x-1)*(32*x^2-8*x+1)*(256*x^4+1)). - Colin Barker, Nov 10 2014

Extensions

a(10)-a(22) from Charles R Greathouse IV, Sep 15 2013

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

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

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 2, 0, 0, 2, 9, 4, 4, 4, 4, 25, 30, 20, 20, 30, 145, 120, 120, 120, 120, 625, 650, 600, 600, 650, 3225, 3100, 3100, 3100, 3100, 15625, 15750, 15500, 15500, 15750, 78625, 78000, 78000, 78000, 78000, 390625, 391250, 390000, 390000, 391250, 1955625, 1952500, 1952500, 1952500, 1952500
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), T(n,4)]' for n >= 0, where ' denotes transpose, and M = [[1,2,0,0,2], [2,1,2,0,0], [0,2,1,2,0], [0,0,2,1,2], [2,0,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..4, and consider the expressions 0^2 + j, 1^2 + j, 2^2 + j, 3^2 + j, and 4^2 + j modulo 5. It can be easily proved that these five numbers contain M[0,j] 0's, M[1,j] 1's, M[2,j] 2's, M[3,j] 3's, and M[4,j] 4'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]'.
The minimal polynomial for M is (z - 5)*(z^2 - 5) = z^3 - 5*z^2 - 5*z + 25. Thus, M^3 - 5*M^2 - 5*M + 25*I = 0, and so M^n*v(0) - 5*M^(n-1)*v(0) - 5*M^(n-2)*v(0) + 25*M^(n-3)*v(0) = 0 for n >= 3. This implies v(n) - 5*v(n-1) - 5*v(n-2) + 25*v(n-3) = 0 for n >= 3. Hence each sequence (T(n,k): n >= 0) satisfies the same recurrence b(n) - 5*b(n-1) - 5*b(n-2) + 25*b(n-3) = 0 for n >= 3.
Clearly, for each k in 0..4, we may find constants c_k, d_k, e_k such that T(n,k) = c_k*sqrt(5)^n + d_k*(-sqrt(5))^n + e_k*5^n for n >= 0. We omit the details.

Examples

			Array T(n,k) (with rows n >= 0 and columns 0 <= k <= 4) begins as follows:
     1,    0,    0,    0,    0;
     1,    2,    0,    0,    2;
     9,    4,    4,    4,    4;
    25,   30,   20,   20,   30;
   145,  120,  120,  120,  120;
   625,  650,  600,  600,  650;
  3225, 3100, 3100, 3100, 3100;
  ...
T(n=2,k=0) = 9 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 0 (mod 5) (with x_1, x_2 in 0..4): (0,0), (1,2), (1,3), (2,1), (2,4), (3,1), (3,4), (4,2), and (4,3).
T(n=2,k=1) = 4 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 1 (mod 5) (with x_1, x_2 in 0..4): (0,1), (0,4), (1,0), and (4,0).
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 5) (with x_1, x_2 in 0..4): (1,1), (1,4), (4,1), and (4,4).
T(n=2,k=3) = 4 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 3 (mod 5) (with x_1, x_2 in 0..4): (2,2), (2,3), (3,2), and (3,3).
T(n=2,k=4) = 4 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 4 (mod 5) (with x_1, x_2 in 0..4): (0,2), (0,3), (2,0), and (3,0).
		

Crossrefs

Programs

  • Maple
    with(LinearAlgebra);
    v := proc(n) local M, v0;
       M := Matrix([[1, 2, 0, 0, 2], [2, 1, 2, 0, 0], [0, 2, 1, 2, 0], [0, 0, 2, 1, 2], [2, 0, 0, 2, 1]]); v0 := Matrix([[1], [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 .. 5), n = 0 .. 10);
  • PARI
    Vec((1 - 4*x^5 + 2*x^6 + 2*x^9 - x^10 - 6*x^11 + 4*x^12 + 4*x^13 - 6*x^14) / ((1 - 5*x^5)*(1 - 5*x^10)) + O(x^50)) \\ Colin Barker, Dec 21 2019

Formula

T(n,k) = 5*T(n-1,k) + 5*T(n-2,k) - 25*T(n-3,k) for n >= 3 with initial conditions for T(0,k), T(1,k), and T(2,k) (for each value of k in 0..4) given in the example below.
T(n,k) = 5*T(n-2,k) + 4*5^(n-2) for n >= 2.
T(n,k=1) = T(n,k=4) and T(n,k=2) = T(n,k=3).
T(n,k) ~ 5^(n-1) for each k in 0..4.
Sum_{k = 0..4} T(n,k) = 5^n.
v(n+1) = M*v(n) and v(n) = M^n * [1,0,0,0,0]' for n >= 0, where M = [[1,2,0,0,2], [2,1,2,0,0], [0,2,1,2,0], [0,0,2,1,2], [2,0,0,2,1]] and v(n) = [T(n,0), T(n,1), T(n,2), T(n,3), T(n,4)]'.
Conjecture: T(n,k=1) = A071304(n)/A071304(n-1) for n >= 2.
From Colin Barker, Dec 21 2019: (Start)
If we consider the array as a single sequence (a(n): n >= 1), then:
G.f.: (1 - 4*x^5 + 2*x^6 + 2*x^9 - x^10 - 6*x^11 + 4*x^12 + 4*x^13 - 6*x^14) / ((1 - 5*x^5)*(1 - 5*x^10)).
a(n) = 5*a(n-5) + 5*a(n-10) - 25*a(n-15) for n > 14. (End)

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.