login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A247588
Number of integer-sided acute triangles with largest side n.
8
1, 2, 3, 5, 6, 8, 11, 13, 15, 17, 21, 25, 27, 31, 34, 39, 43, 48, 52, 56, 63, 67, 73, 80, 84, 90, 96, 104, 111, 117, 126, 132, 140, 147, 154, 165, 172, 183, 189, 198, 210, 219, 229, 237, 247, 260, 270, 282, 292, 302
OFFSET
1,2
FORMULA
a(n) = Sum_{j=0..floor(n*(1 - sqrt(2)/2))} (n - j - floor(sqrt(2*j*n - j^2))). - Anton Nikonov, Oct 06 2014
a(n) = (1/8)*(-4*ceiling((n - 1)/sqrt(2)) + 4*n^2 - A000328(n) + 1), n > 1. - Mats Granvik, May 23 2015
EXAMPLE
a(3) = 3 because there are 3 integer-sided acute triangles with largest side 3: (1,3,3); (2,3,3); (3,3,3).
MAPLE
tr_a:=proc(n) local a, b, t, d; t:=0:
for a to n do
for b from max(a, n+1-a) to n do
d:=a^2+b^2-n^2:
if d>0 then t:=t+1 fi
od od;
t; end;
MATHEMATICA
a[ n_] := Length @ FindInstance[ n >= b >= a >= 1 && n < b + a && n^2 < b^2 + a^2, {a, b}, Integers, 10^9]; (* Michael Somos, May 24 2015 *)
PROG
(PARI) a(n) = sum(j=0, n*(1 - sqrt(2)/2), n - j - floor(sqrt(2*j*n - j^2))); \\ Michel Marcus, Oct 07 2014
(PARI) {a(n) = sum(j=0, n - sqrtint(n*n\2) - 1, n - j - sqrtint(2*j*n - j*j))}; /* Michael Somos, May 24 2015 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Letsko, Sep 20 2014
STATUS
approved