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!)
A005353 Number of 2 X 2 matrices with entries mod n and nonzero determinant.
(Formerly M4254)
5
0, 6, 48, 168, 480, 966, 2016, 3360, 5616, 8550, 13200, 17832, 26208, 34566, 45840, 59520, 78336, 95526, 123120, 147240, 181776, 219846, 267168, 307488, 372000, 433446, 505440, 580776, 682080, 762150, 892800, 999936, 1138368, 1284486 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
REFERENCES
T. Brenner, personal communication.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
FORMULA
a(n) = n^4 - A020478(n).
For prime n, a(n) = (n^2-1)(n-1)n. - T. D. Noe, Jan 12 2006
MATHEMATICA
Table[cnt=0; Do[m={{a, b}, {c, d}}; If[Det[m, Modulus->p] > 0, cnt++ ], {a, 0, p-1}, {b, 0, p-1}, {c, 0, p-1}, {d, 0, p-1}]; cnt, {p, 37}] (* T. D. Noe, Jan 12 2006 *)
f[p_, e_] := p^(2*e - 1)*(p^(e + 1) + p^e - 1); a[1] = 0; a[n_] := n^4 - Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 31 2023 *)
PROG
(PARI) a(n) = {my(f = factor(n), p, e); n^4 - prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; p^(2*e - 1)*(p^(e + 1) + p^e - 1)); } \\ Amiram Eldar, Oct 31 2023
CROSSREFS
Sequence in context: A244726 A335384 A331668 * A047927 A059238 A371067
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from T. D. Noe, Jan 12 2006
STATUS
approved

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 14 07:09 EDT 2024. Contains 372530 sequences. (Running on oeis4.)