login
The number of symmetric positive definite 2 X 2 matrices whose entries are integers of absolute value at most n.
1

%I #11 Oct 11 2019 03:03:53

%S 1,10,31,68,133,226,351,512,721,986,1303,1676,2125,2642,3231,3896,

%T 4665,5522,6479,7532,8701,9986,11383,12896,14553,16354,18287,20364,

%U 22605,24994,27543,30248,33145,36226,39479,42908,46557,50402,54439,58680

%N The number of symmetric positive definite 2 X 2 matrices whose entries are integers of absolute value at most n.

%C A symmetric matrix [[a,c],[c,b]] is positive definite if and only if a > 0 and ab - c^2 > 0. So a(n) is also the number of triples (a,b,c) satisfying these inequalities with a,b,c having absolute value at most n.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Positive-definite_matrix">Positive Definite Matrix</a>

%p a:=proc(n)

%p local x,y,z,count;

%p count:=0;

%p for x from 1 to n do

%p for y from 1 to n do

%p for z from -n to n do

%p if x>0 and x*y > z^2 then count:=count+1; fi;

%p od:

%p od:

%p od:

%p count;

%p end:

%t Table[cnt = 0; Do[If[a*b > c^2, cnt++], {a, n}, {b, n}, {c, -n, n}]; cnt, {n, 40}] (* _T. D. Noe_, Nov 26 2012 *)

%K nonn

%O 1,2

%A _W. Edwin Clark_, Nov 25 2012