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.

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

Original entry on oeis.org

1, 10, 31, 68, 133, 226, 351, 512, 721, 986, 1303, 1676, 2125, 2642, 3231, 3896, 4665, 5522, 6479, 7532, 8701, 9986, 11383, 12896, 14553, 16354, 18287, 20364, 22605, 24994, 27543, 30248, 33145, 36226, 39479, 42908, 46557, 50402, 54439, 58680
Offset: 1

Views

Author

W. Edwin Clark, Nov 25 2012

Keywords

Comments

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.

Programs

  • Maple
      a:=proc(n)
    local x,y,z,count;
    count:=0;
    for x from 1 to n do
    for y from 1 to n do
    for z from -n to n do
    if x>0 and x*y > z^2 then count:=count+1; fi;
    od:
    od:
    od:
    count;
    end:
  • Mathematica
    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 *)