OFFSET
1,3
COMMENTS
a(n) < n and lim_{n->inf} (Sum_{k=1..n} a(k)) / (n*log(n)^3) = 3/(2*Pi^2) (see article).
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
J. Brzezinski, W. Holsztynski and P. Kurlberg, On the congruence ax+by=1 modulo xy, arXiv:math/0308194 [math.NT], 2003.
David A. Corneth, List of distinct solutions for a(n) where n = 1..300
EXAMPLE
10 = (1+1/19)(9+1/2) = (3+1/13)(3+1/4) = (1+1/14)(9+1/3) = (3+1/8)(3+1/5) = (1+1/11)(9+1/6) = (1+1/5)(8+1/3) = (1+1/3)(7+1/2) = (1+1/10)(9+1/11). These are all 8 distinct such expressions for 10 so a(10) = 8. - David A. Corneth, Feb 18 2019
MATHEMATICA
w[n_] := Module[{ant = 0}, Do[For[X = 1, X <= Floor[Sqrt[n]], X++, Do[If[ GCD[n-k, X] != X || GCD[n/a + (n-k)/X, k] != k, Continue[]]; Y = (n-k)/X; x = (n/a + (n-k)/X)/k; y = (a+X)/k; If[x == 1 || y == 1, Continue[]]; If[ X == Y, ant = ant+1/2, ant = ant+1], {k, Divisors[a+X]}]], {a, Divisors[n] }]; ant]; Array[w, 73] (* Jean-François Alcover, Feb 18 2019, translated from PARI *)
PROG
(PARI) a(n)=ant=0; fordiv(n, d, for(X=1, floor(sqrt(n)), fordiv(d+X, k, if(gcd(n-k, X)!=X||gcd(n/d+(n-k)/X, k)!=k, next); Y=(n-k)/X; x=(n/d+(n-k)/X)/k; y=(d+X)/k; if(x==1||y==1, next); if(X==Y, ant=ant+1/2, ant=ant+1)))); ant \\ Juliusz Brzezinski
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Aug 22 2003; revised Dec 08 2004
STATUS
approved