login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A086886
Ljungstrand's sequence: number of distinct solutions to n = (X + 1/x)(Y + 1/y), where x,y > 1 and X,Y are integers.
1
0, 1, 2, 3, 4, 5, 5, 6, 8, 8, 8, 9, 8, 10, 14, 12, 10, 11, 10, 14, 17, 14, 13, 16, 18, 13, 17, 21, 13, 19, 12, 14, 23, 16, 26, 26, 14, 17, 21, 26, 16, 23, 16, 22, 30, 22, 18, 22, 24, 22, 26, 23, 18, 28, 33, 32, 29, 21, 20, 32, 19, 19, 30, 30, 35, 27, 18, 28, 31, 41, 20, 33, 19
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
J. Brzezinski, W. Holsztynski and P. Kurlberg, On the congruence ax+by=1 modulo xy, arXiv:math/0308194 [math.NT], 2003.
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
Sequence in context: A363694 A330292 A017866 * A017840 A017855 A051598
KEYWORD
nonn
AUTHOR
Ralf Stephan, Aug 22 2003; revised Dec 08 2004
STATUS
approved