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.
%I A115878 #33 Aug 21 2024 14:58:28 %S A115878 0,0,1,0,1,1,1,1,2,1,1,1,1,1,4,2,1,2,1,1,4,1,1,4,2,1,3,1,1,4,1,3,4,1, %T A115878 4,2,1,1,4,4,1,4,1,1,7,1,1,7,2,2,4,1,1,3,4,4,4,1,1,4,1,1,7,4,4,4,1,1, %U A115878 4,4,1,7,1,1,7,1,4,4,1,7,4,1,1,4,4,1,4,4,1,7,4,1,4,1,4,10,1,2,7,2,1,4 %N A115878 a(n) is the number of positive solutions of the Diophantine equation x^2 = y(y+n). %C A115878 Number of divisors d of n^2 such that d^2 < n^2 and n^2/d == d (mod 4). - _Antti Karttunen_, Oct 06 2018, based on _Robert Israel_'s Jun 27 2014 comment in A115880. %C A115878 For odd n, a(n) can be computed from the prime signature. - _David A. Corneth_, Oct 07 2018 %C A115878 Number of r X s rectangles with integer side lengths such that r + s = n, r < s and (s-r) | (s*r). - _Wesley Ivan Hurt_, Apr 24 2020 %H A115878 Antti Karttunen, <a href="/A115878/b115878.txt">Table of n, a(n) for n = 1..18480</a> %H A115878 Antti Karttunen, <a href="/A115878/a115878.txt">Data supplement: n, a(n) computed for n = 1..100000</a> %F A115878 From _David A. Corneth_, Oct 07 2018: (Start) %F A115878 a((2k+1) * 2^m) = floor(tau((2k + 1) ^ 2) / 2) for m <= 2. %F A115878 a((2k+1) * 2^m) = (2m - 3) * a(2k+1) + (m-2) for m > 2. (End) %F A115878 a(n) = Sum_{i=1..floor((n-1)/2)} (1 - ceiling(i*(n-i)/(n-2*i)) + floor(i*(n-i)/(n-2*i))). - _Wesley Ivan Hurt_, Apr 24 2020 %e A115878 a(15) = 4 since there are 4 solutions (x,y) to x^2 = y(y+15), namely (4,1), (10,5), (18, 12) and (56, 49). %e A115878 Note how each x is obtained from each such divisor pair n2/d and d of n2 as (n2/d - d)/4, when their difference is a positive multiple of four, thus in case of n2 = 15^2 = 225 we get (225/1 - 1)/4 = 56, (225/3 - 3)/4 = 18, (225/5 - 5) = 10 and (225/9 - 9)/4 = 4. - _Antti Karttunen_, Oct 06 2018 %e A115878 a(96) = 10. We compute P, the largest power of 2 dividing n = 96. Then compute min(P, 4) and divide n by it. This gives 96/4 = 24. Then find the number of divisors of 24^2, which is 21. Dividing by 2 rounding down to the nearest integer gives 10, the value of a(96). - _David A. Corneth_, Oct 06 2018 %t A115878 a[n_] := Sum[Boole[d^2 < n^2 && Mod[n^2/d-d, 4] == 0], {d, Divisors[n^2]}]; %t A115878 Array[a, 102] (* _Jean-François Alcover_, Feb 27 2019, from PARI *) %o A115878 (PARI) A115878(n) = { my(n2 = n^2); sumdiv(n2,d,((d*d)<n2)&&(0==(((n2/d)-d)%4))); }; \\ _Antti Karttunen_, Oct 06 2018 %o A115878 (PARI) a(n) = my(v=min(2, valuation(n,2))); numdiv((n>>v)^2)>>1 \\ _David A. Corneth_, Oct 06 2018 %o A115878 (Python) %o A115878 from itertools import takewhile %o A115878 from sympy import divisors %o A115878 def A115878(n): return sum(1 for d in takewhile(lambda d:d<n, divisors(n**2)) if not (d-n**2//d)&3) # _Chai Wah Wu_, Aug 21 2024 %Y A115878 Cf. A067721, A115879, A115880, A115881. %K A115878 nonn,easy %O A115878 1,9 %A A115878 _Giovanni Resta_, Feb 02 2006