The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A211034 Number of 2 X 2 matrices having all elements in {0,1,...,n} and determinant = 1 (mod 3). 4

%I #23 Nov 29 2016 08:00:36

%S 0,3,24,52,164,384,592,1131,1944,2628,4128,6144,7744,10955,15000,

%T 18100,23988,31104,36432,46179,57624,66052,81056,98304,110848,132723,

%U 157464,175284,205860,240000,264400,305723,351384,383812,438144,497664,539712,609531

%N Number of 2 X 2 matrices having all elements in {0,1,...,n} and determinant = 1 (mod 3).

%C Also, the number of 2 X 2 matrices having all elements in {0,1,...,n} and determinant = 2 (mod 3). A211033(n) + 2*A211034(n)=n^4 for n>0. For a guide to related sequences, see A210000.

%H Chai Wah Wu, <a href="/A211034/b211034.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Rec#order_13">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,4,-4,0,-6,6,0,4,-4,0,-1,1).

%F From _Chai Wah Wu_, Nov 28 2016: (Start)

%F a(n) = a(n-1) + 4*a(n-3) - 4*a(n-4) - 6*a(n-6) + 6*a(n-7) + 4*a(n-9) - 4*a(n-10) - a(n-12) + a(n-13) for n > 12.

%F G.f.: -x*(4*x^9 + 20*x^8 + 59*x^7 + 109*x^6 + 96*x^5 + 136*x^4 + 100*x^3 + 28*x^2 + 21*x + 3)/((x - 1)^5*(x^2 + x + 1)^4).

%F If r = floor(n/3)+1, s = floor((n-1)/3)+1 and t = floor((n-2)/3)+1, then:

%F a(n) = r^2*s^2 + 2*r^2*s*t + r^2*t^2 + 2*r*s^3 + 6*r*s^2*t + 6*r*s*t^2 + 2*r*t^3 + 2*s^3*t + 2*s*t^3.

%F If n == 0 mod 3, then a(n) = 4*n^2*(2*n^2 + 6*n + 3)/27.

%F If n == 1 mod 3, then a(n) = (8*n^4 + 28*n^3 + 33*n^2 + 16*n - 4)/27.

%F If n == 2 mod 3, then a(n) = 8*(n + 1)^4/27. (End)

%t t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]

%t c[n_, k_] := c[n, k] = Count[t[n], k]

%t u[n_] := u[n] = Sum[c[n, 3 k], {k, -2*n^2, 2*n^2}]

%t v[n_] := v[n] = Sum[c[n, 3 k + 1], {k, -2*n^2, 2*n^2}]

%t w[n_] := w[n] = Sum[c[n, 3 k + 2], {k, -2*n^2, 2*n^2}]

%t Table[u[n], {n, 0, z1}] (* A211033 *)

%t Table[v[n], {n, 0, z1}] (* A211034 *)

%t Table[w[n], {n, 0, z1}] (* A211034 *)

%t LinearRecurrence[{1, 0, 4, -4, 0, -6, 6, 0, 4, -4, 0, -1, 1}, {0, 3, 24, 52, 164, 384, 592, 1131, 1944, 2628, 4128, 6144, 7744}, 60] (* _Vincenzo Librandi_, Nov 29 2016 *)

%o (Python)

%o from __future__ import division

%o def A211034(n):

%o x,y,z = n//3 + 1, (n-1)//3 + 1, (n-2)//3 + 1

%o return x**2*y**2 + 2*x**2*y*z + x**2*z**2 + 2*x*y**3 + 6*x*y**2*z + 6*x*y*z**2 + 2*x*z**3 + 2*y**3*z + 2*y*z**3 # _Chai Wah Wu_, Nov 28 2016

%Y Cf. A210000, A211033.

%K nonn,easy

%O 0,2

%A _Clark Kimberling_, Mar 30 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 04:26 EDT 2024. Contains 372921 sequences. (Running on oeis4.)