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!)
A196227 Number of 2 X 2 integer matrices with elements from {1,...,n} whose determinant is 1. 5

%I #21 May 05 2020 17:07:33

%S 0,0,2,8,14,28,34,56,70,92,106,144,158,204,226,256,286,348,370,440,

%T 470,516,554,640,670,748,794,864,910,1020,1050,1168,1230,1308,1370,

%U 1464,1510,1652,1722,1816,1878,2036,2082,2248,2326,2420,2506,2688,2750,2916,2994

%N Number of 2 X 2 integer matrices with elements from {1,...,n} whose determinant is 1.

%C It is also the number of 2 X 2 integer matrices with elements from {1,...,n} whose determinant is -1.

%H Andrew Howroyd, <a href="/A196227/b196227.txt">Table of n, a(n) for n = 0..1000</a>

%F From _Andrew Howroyd_, May 05 2020: (Start)

%F a(n) = A171503(n) - (2*n + 1) for n > 0.

%F a(n) = -2*(n + 1) + 4*Sum_{k=1..n} phi(k) for n > 0.

%F a(n) = 2 * A209978(n). (End)

%p a:= proc(n) option remember; `if`(n<2, 0,

%p a(n-1)-2 + 4*numtheory[phi](n))

%p end:

%p seq(a(n), n=0..60); # _Alois P. Heinz_, May 05 2020

%t Table[cnt = 0; Do[If[a*d-b*c == 1, cnt++], {a, n}, {b, n}, {c, n}, {d, n}]; cnt, {n, 50}] (* _T. D. Noe_, Oct 11 2011 *)

%o (PARI) a(n) = if(n < 1, 0, 4*sum(k=1, n, eulerphi(k)) - 2*(n + 1)) \\ _Andrew Howroyd_, May 05 2020

%Y Cf. A171503 (determinants of matrices that include zero), A209978, A210000.

%K nonn

%O 0,3

%A _Aldo González Lorenzo_, Sep 29 2011

%E a(0)=0 prependend by _Andrew Howroyd_, May 05 2020

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 August 26 16:11 EDT 2024. Contains 375459 sequences. (Running on oeis4.)