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 A018892 #104 May 11 2025 22:06:03 %S A018892 1,2,2,3,2,5,2,4,3,5,2,8,2,5,5,5,2,8,2,8,5,5,2,11,3,5,4,8,2,14,2,6,5, %T A018892 5,5,13,2,5,5,11,2,14,2,8,8,5,2,14,3,8,5,8,2,11,5,11,5,5,2,23,2,5,8,7, %U A018892 5,14,2,8,5,14,2,18,2,5,8,8,5,14,2,14,5,5,2,23,5,5,5,11,2,23,5,8,5,5,5,17,2,8,8 %N A018892 Number of ways to write 1/n as a sum of exactly 2 unit fractions. %C A018892 Number of elements in the set {(x,y): x|n, y|n, x<=y, gcd(x,y)=1}. Number of divisors of n^2 less than or equal to n. - _Vladeta Jovovic_, May 03 2002 %C A018892 Equivalently, number of pairs (x,y) such that lcm(x,y)=n. - _Benoit Cloitre_, May 16 2002 %C A018892 Also, number of right triangles with an integer hypotenuse and height n. - _Reinhard Zumkeller_, Jul 10 2002 %C A018892 The triangles are to be considered as resting on their hypotenuse, with the height measured to the right angle. - _Franklin T. Adams-Watters_, Feb 19 2015 %C A018892 a(n) >= 2 for n>=2 because of the identities 1/n = 1/(2*n) + 1/(2*n) = 1/(n+1) + 1/(n*(n+1)). - _Lekraj Beedassy_, May 04 2004 %C A018892 a(n) is the number of divisors of n^2 that are <= n; e.g., a(12) counts these 8 divisors of 12: 1,2,3,4,6,8,9,12. - _Clark Kimberling_, Apr 21 2019 %D A018892 K. S. Brown, Posting to netnews group sci.math, Aug 17 1996. %D A018892 L. E. Dickson, History of The Theory of Numbers, Vol. 2 p. 690, Chelsea NY 1923. %D A018892 A. M. and I. M. Yaglom, Challenging Mathematical Problems With Elementary Solutions, Vol. 1, Dover, N.Y., 1987, pp. 8 and 60, Problem 19. %H A018892 T. D. Noe, <a href="/A018892/b018892.txt">Table of n, a(n) for n = 1..10000</a> %H A018892 Jorg Brown, <a href="/A018894/a018894.txt">Comparison of records in sigma(n)/phi(n) and A018892</a>. %H A018892 Roger B. Eggleton, <a href="http://www.jstor.org/stable/2589730">Problem 10501(a)</a>, American Mathematical Monthly, Vol. 105, No. 4, (1998), p. 372. %H A018892 Project Euler, <a href="https://projecteuler.net/problem=379">Problem 379: Least common multiple count</a>. %F A018892 If n = (p1^a1)(p2^a2)...(pt^at), a(n) = ((2*a1 + 1)(2*a2 + 1) ... (2*at + 1) + 1)/2. %F A018892 a(n) = (tau(n^2)+1)/2. - _Vladeta Jovovic_, May 03 2002 %F A018892 a(n) = A063647(n)+1 = A046079(2*n)+1. - _Lekraj Beedassy_, Dec 01 2003 %F A018892 a(n) = Sum_{d|n} phi(2^omega(d)), where phi is A000010 and omega is A001221. - _Enrique Pérez Herrero_, Apr 13 2012 %F A018892 a(n) = A000005(n) + A089233(n). - _James Spahlinger_, Feb 16 2016 %F A018892 a(n) = n + Sum_{i=1..n} sign(n^2 mod -i). - _Wesley Ivan Hurt_, Apr 07 2021 %F A018892 a(n) = Sum_{d|n} mu(n/d)*A184389(d). - _Ridouane Oudra_, Feb 22 2022 %F A018892 Sum_{k=1..n} a(k) ~ (n/(2*zeta(2)))*(log(n)^2/2 + log(n)*(3*gamma - 1) + 1 - 3*gamma + 3*gamma^2 - 3*gamma_1 + zeta(2) + (2 - 6*gamma - 2*log(n))*zeta'(2)/zeta(2) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2)), where gamma is Euler's constant (A001620) and gamma_1 is the first Stieltjes constant (A082633). - _Amiram Eldar_, Oct 03 2024 %e A018892 n=1: 1/1 = 1/2 + 1/2. %e A018892 n=2: 1/2 = 1/4 + 1/4 = 1/3 + 1/6. %e A018892 n=3: 1/3 = 1/6 + 1/6 = 1/4 + 1/12. %t A018892 f[j_, n_] := (Times @@ (j(Last /@ FactorInteger[n]) + 1) + j - 1)/j; Table[f[2, n], {n, 96}] (* _Robert G. Wilson v_, Aug 03 2005 *) %t A018892 a[n_] := (DivisorSigma[0, n^2] + 1)/2; Table[a[n], {n, 1, 99}](* _Jean-François Alcover_, Dec 19 2011, after _Vladeta Jovovic_ *) %o A018892 (PARI) A018892(n)=(numdiv(n^2)+1)/2 \\ _M. F. Hasler_, Dec 30 2007 %o A018892 (PARI) A018892s(n)=local(t=divisors(n^2));vector((#t+1)/2,i,[n+t[i],n+n^2/t[i]]) /* show solutions */ \\ _M. F. Hasler_, Dec 30 2007 %o A018892 (PARI) a(n)=sumdiv(n,d,sum(i=1,d,lcm(d,i)==n)) \\ _Charles R Greathouse IV_, Apr 08 2012 %o A018892 (Haskell) %o A018892 a018892 n = length [d | d <- [1..n], n^2 `mod` d == 0] %o A018892 -- _Reinhard Zumkeller_, Jan 08 2012 %o A018892 (Python) %o A018892 from math import prod %o A018892 from sympy import factorint %o A018892 def A018892(n): return prod((a<<1)+1 for a in factorint(n).values())+1>>1 # _Chai Wah Wu_, Aug 20 2023 %Y A018892 Records: A126097, A126098. %Y A018892 Cf. A000010, A001221, A046079, A048691, A063647, A089233, A184389. %Y A018892 Cf. A001620, A082633, A013661, A201994, A306016. %K A018892 nonn,easy,nice %O A018892 1,2 %A A018892 _Robert G. Wilson v_ %E A018892 More terms from _David W. Wilson_, Sep 15 1996 %E A018892 First example corrected by Jason Orendorff (jason.orendorff(AT)gmail.com), Jan 02 2009 %E A018892 Incorrect Mathematica program deleted by _N. J. A. Sloane_, Jul 08 2009