login
Number of ways to write 1/n as a difference of exactly 2 unit fractions.
32

%I #123 Oct 03 2024 08:19:57

%S 0,1,1,2,1,4,1,3,2,4,1,7,1,4,4,4,1,7,1,7,4,4,1,10,2,4,3,7,1,13,1,5,4,

%T 4,4,12,1,4,4,10,1,13,1,7,7,4,1,13,2,7,4,7,1,10,4,10,4,4,1,22,1,4,7,6,

%U 4,13,1,7,4,13,1,17,1,4,7,7,4,13,1,13,4,4,1,22,4,4,4,10,1,22,4,7,4,4,4

%N Number of ways to write 1/n as a difference of exactly 2 unit fractions.

%C Also number of ways to write 1/n as sum of exactly two distinct unit fractions. - _Thomas L. York_, Jan 11 2014

%C Also number of positive integers m such that 1/n + 1/m is a unit fraction. - _Jon E. Schoenfield_, Apr 17 2018

%C If 1/n = 1/b - 1/c then n = bc/(c-b) and 1/n = 1/(2n-b) + 1/(c+2n) (though it is also the case that 1/n = 1/(2n) + 1/(2n) equivalent to b = c = 0).

%C Also number of divisors of n^2 less than n. - _Vladeta Jovovic_, Aug 13 2001

%C Number of elements in the set {(x,y): x|n, y|n, x<y, gcd(x,y)=1}. - _Vladeta Jovovic_, May 03 2002

%C Also number of positive integers of the form k*n/(k+n). - _Benoit Cloitre_, Jan 04 2002

%C This is similar to A062799, having the same first 29 terms. But they are different sequences.

%C If A001221(n) = omega(n) <= 2, then a(n) = A062799(n); if A001221(n) > 2, then a(n) > A062799(n). - _Matthew Vandermast_, Aug 25 2004

%C Number of r X s integer-sided rectangles such that r + s = 4n, r < s and (s - r) | (s * r). - _Wesley Ivan Hurt_, Apr 24 2020

%C Also number of integer-sided right triangles with 2n as a leg. Equivalent to the even indices of A046079. - _Nathaniel C Beckman_, May 14 2020; Jun 26 2020

%H T. D. Noe, <a href="/A063647/b063647.txt">Table of n, a(n) for n = 1..10000</a>

%H Christopher J. Bradley, <a href="http://cms.math.ca/crux/v23/n7/page433-448.pdf">Solution to Problem 2175</a>, Crux Mathematicorum, Vol. 23, No. 7, (Nov 1997), pp. 443-444.

%H Umberto Cerruti, <a href="/A146564/a146564.pdf">Percorsi tra i numeri</a> (in Italian), pages 3-4.

%H Roger B. Eggleton, <a href="http://www.jstor.org/stable/2589730">Unitary Fractions: 10501</a>, The American Mathematical Monthly, Vol. 105, No. 4 (Apr., 1998), p. 372.

%H Amiram Eldar, <a href="/A063647/a063647.png">Plot of (Sum_{i=1..n} a(i))/f(n) - 1, where f(n) is an asymptotic function, for n = 2^(1..28)</a>.

%H Amiram Eldar, <a href="/A063647/a063647_1.png">Plot of Sum_{i=1..n} a(i)/(n*log(n)*log(log(n))) for n = 2^(1..28)</a>.

%H Amarnath Murthy, <a href="https://fs.unm.edu/SNJ/DecompositionOfTheDivisorsOfANatural.pdf">Decomposition of the divisors of a natural number into pairwise coprime sets</a>, Smarandache Notions Journal, Vol. 12, No. 1-2-3, Spring 2001, pp. 303-306.

%F a(n) = (tau(n^2)-1)/2.

%F a(n) = A018892(n)-1. If n = (p1^a1)(p2^a2)...(pt^at), a(n) = ((2*a1+1)(2*a2+1)...(2*at+1)-1)/2.

%F If n is prime a(n)=1. Conjecture: (1/n)*Sum_{i=1..n} a(i) = C*log(n)*log(log(n)) + o(log(n)) with C=0.7... [The conjecture is false. See the plot and the asymptotic formula below. - _Amiram Eldar_, Oct 03 2024]

%F Bisection of A046079. - _Lekraj Beedassy_, Jul 09 2004

%F a(n) = Sum_{i=1..2*n-1} (1 - ceiling(i*(4*n-i)/(4*n-2*i)) + floor(i*(4*n-i)/(4*n-2*i))). - _Wesley Ivan Hurt_, Apr 24 2020

%F 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 a(10) = 4 since 1/10 = 1/5 - 1/10 = 1/6 - 1/15 = 1/8 - 1/40 = 1/9 - 1/90.

%e a(12) = 7: the divisors of 12 are 1, 2, 3, 4, 6 and 12 and the decompositions are (1, 2), (1, 3), (1, 4), (1, 6), (1, 12), (2, 3), (3, 4).

%t Table[(Length[Divisors[n^2]] - 1)/2, {n, 1, 100}]

%t (DivisorSigma[0,Range[100]^2]-1)/2 (* _Harvey P. Dale_, Apr 15 2013 *)

%o (PARI) for(n=1,100,print1(sum(i=1,n^2,if((n*i)%(i+n),0,1)),","))

%o (PARI) a(n)=numdiv(n^2)\2 \\ _Charles R Greathouse IV_, Oct 03 2016

%o (Magma) [(NumberOfDivisors(n^2)-1)/2 : n in [1..100]]; // _Vincenzo Librandi_, Apr 18 2018

%Y Cf. A018892, A063427, A063428.

%Y First twenty-nine terms identical to those of A062799.

%Y Cf. A001221, A046079, A048691, A063717, A063718.

%Y Cf. A001620, A082633, A013661, A201994, A306016.

%K nonn,easy,nice

%O 1,4

%A _Henry Bottomley_, Jul 23 2001