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.

A247586 Number of acute triangles with integer sides less than or equal to n.

This page as a plain text file.
%I A247586 #21 Jun 19 2019 08:16:47
%S A247586 1,3,6,11,17,25,36,49,64,81,102,127,154,185,219,258,301,349,401,457,
%T A247586 520,587,660,740,824,914,1010,1114,1225,1342,1468,1600,1740,1887,2041,
%U A247586 2206,2378,2561,2750,2948
%N A247586 Number of acute triangles with integer sides less than or equal to n.
%H A247586 Vladimir Letsko, <a href="http://dxdy.ru/post909787.html#p909787">Mathematical Marathon, problem 192</a> (in Russian).
%e A247586 a(2) = 3 because there are 3 acute triangles with integer sides less than or equal to 2: (1,1,1); (1,2,2); (2,2,2).
%p A247586 tr_a:=proc(n) local a,b,c,t,d;t:=0:
%p A247586   for a to n do
%p A247586   for b from a to n do
%p A247586   for c from b to min(a+b-1,n) do
%p A247586   d:=a^2+b^2-c^2:
%p A247586   if d>0 then t:=t+1 fi
%p A247586   od od od;
%p A247586   [n,t]; end;
%t A247586 a[n_] := Module[{a, b, c, d, t = 0}, Do[d = a^2 + b^2 - c^2; If[d>0, t++], {a, n}, {b, a, n}, {c, b, Min[a+b-1, n]}]; t]; Array[a, 40] (* _Jean-François Alcover_, Jun 19 2019, from Maple *)
%o A247586 (Python)
%o A247586 import itertools
%o A247586 def A247586(n):
%o A247586     I = itertools.combinations_with_replacement(range(1,n+1),3)
%o A247586     F = filter(lambda c: c[0]**2 + c[1]**2 > c[2]**2, I)
%o A247586     return len(list(F))
%o A247586 print([A247586(n) for n in range(41)]) # _Peter Luschny_, Sep 22 2014
%Y A247586 Cf. A002623, A224921, A247587, A247588, A247589.
%K A247586 nonn
%O A247586 1,2
%A A247586 _Vladimir Letsko_, Sep 20 2014