%I #31 Mar 09 2022 00:21:36
%S 0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,
%T 3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,
%U 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
%N Number of primitive Pythagorean triangles of form (X,Y,Y+1) with hypotenuse Y+1 less than or equal to n.
%C Indices where records occur are hypotenuse values A001844 (Y+1); corresponding leg values given by A046092 (Y) and A005408 (X).
%C The number k, for k >= 0, appears exactly 4*(k+1) = A008586(k+1) times. The number k appears for the first time for a(4*T(k) + 1) = a(A001844(k)), where T(k) = A000217(k); see the preceding comment on records. - _Wolfdieter Lang_, Mar 01 2022
%H Vincenzo Librandi, <a href="/A095861/b095861.txt">Table of n, a(n) for n = 1..10000</a>
%H S. Crowley, <a href="http://vixra.org/abs/1202.0079">Mellin and Laplace Integral Transforms Related to the Harmonic Sawtooth Map and a Diversion Into The Theory Of Fractal Strings</a>, vixra:1202.0079, 2012.
%H S. Crowley, <a href="http://arxiv.org/abs/1210.5652">Integral Transforms of the Harmonic Sawtooth Map, The Riemann Zeta Function, Fractal Strings, and a Finite Reflection Formula</a>, arXiv preprint arXiv:1210.5652 [math.NT], 2012. - _N. J. A. Sloane_, Jan 01 2013
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PythagoreanTriple.html">Pythagorean Triple.</a>
%F a(n) = floor((sqrt(2*n-1) - 1)/2).
%p A095861 := proc (x) local y; y := 0; while (2*y+2)*(y+2) <= x do y := y+1 end do; return y end proc; map(A095861, [seq(k, k = 0 .. 100)]) # _Stephen Crowley_, Aug 01 2009
%t Table[Floor[(Sqrt[2*n-1] - 1)/2], {n, 1, 100}] (* _Jean-François Alcover_, Apr 01 2018 *)
%o (Magma) [Floor((Sqrt(2*n-1)-1)/2): n in [1..105]]; // _Vincenzo Librandi_, Apr 01 2018
%Y Cf. A000217, A001844, A005408, A008586, A046092.
%K nonn,easy
%O 1,13
%A _Ray Chandler_, Jun 20 2004