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!)
A247587 Number of obtuse triangles with integer sides at most n. 5

%I #23 Mar 14 2021 15:25:05

%S 0,0,1,2,4,8,13,20,30,42,57,74,95,120,149,182,219,261,309,362,420,485,

%T 556,632,715,806,906,1012,1125,1247,1377,1517,1666,1824,1993,2170,

%U 2358,2555,2765,2986

%N Number of obtuse triangles with integer sides at most n.

%H Charles R Greathouse IV, <a href="/A247587/b247587.txt">Table of n, a(n) for n = 1..10000</a>

%H Vladimir Letsko, <a href="http://dxdy.ru/post909787.html#p909787">Mathematical Marathon, problem 192</a> (in Russian).

%e a(4) = 2 because there are 2 obtuse triangles with integer sides less than or equal to 4: (2,2,3); (2,3,4).

%p tr_o:=proc(n) local a, b, c, t, d; t:=0:

%p for a to n do

%p for b from a to n do

%p for c from b to min(a+b-1, n) do

%p d:=a^2+b^2-c^2:

%p if d<0 then t:=t+1 fi

%p od od od;

%p [n, t]; end;

%o (PARI) a(n)=sum(a=2,n-1,sum(b=a,n-1,max(0,min(n,a+b-1)-sqrtint(a^2+b^2)))) \\ _Charles R Greathouse IV_, Sep 20 2014

%o (PARI) obtuse(n)=sum(a=2,n-1, max(0, sqrtint(n^2-1-a^2)-max(a,n-a+1)+1))

%o s=0; vector(100,n, s+=obtuse(n)) \\ _Charles R Greathouse IV_, Sep 20 2014

%Y Cf. A002623, A224921, A247586, A247588, A247589.

%K nonn

%O 1,4

%A _Vladimir Letsko_, Sep 20 2014

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 July 11 21:50 EDT 2024. Contains 374234 sequences. (Running on oeis4.)