cp's OEIS Frontend

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.

A376012 a(n) = number of solutions (x_1, x_2, ..., x_n) to Product_{i=1..n} (1 + 1/x_i) = any integer.

This page as a plain text file.
%I A376012 #15 Dec 01 2024 11:44:25
%S A376012 1,1,3,12,83,1323,63090,14736464
%N A376012 a(n) = number of solutions (x_1, x_2, ..., x_n) to Product_{i=1..n} (1 + 1/x_i) = any integer.
%C A376012 Number of ways any integer is a product of n superparticular ratios, without regard to order.  A superparticular ratio is a ratio of the form (m+1)/m.
%e A376012 For n = 2, a(2) = 3, three solutions, {x_1, x_2} = {2, 3} = 2; {1, 2} = 3; {1, 1} = 4.
%e A376012 In other words, a(2) = 3 since 2 can be written as (3/2)(4/3), 3 can be written as (2/1)(3/2), and 4 can be written as (2/1)^2, but no other integers are the product of two superparticular ratios.
%e A376012 a(3) = 12 since 2 can be written in 5 ways, 3 can be written in 3 ways, and 4, 5, 6, and 8 can be written in 1 way each, as the product of three superparticular ratios.
%o A376012 (PARI) f(n, m, p, q)={ \\ the number of solutions in which product of the ratios is equal to p/q
%o A376012     if(p<=q, return(0));
%o A376012     if(n==1, return(if(q%(p-q)==0, 1, 0)));
%o A376012     x=floor(1/((p/q)^(1/n)-1)); \\ x is the maximum of the least denominator of the ratios
%o A376012     my(ans=0);
%o A376012     for(i=m, x, ans=ans+f(n-1, i, p*i, q*(i+1)));
%o A376012     \\ m indicates that the solutions require the denominators of all ratios not to be less than m
%o A376012     \\ discard the ratio (i+1)/i
%o A376012     return(ans);
%o A376012 };
%o A376012 a(n)={
%o A376012     my(ans=0);
%o A376012     for(i=2, 2^n, ans=ans+f(n, 1, i, 1));
%o A376012     return(ans);
%o A376012 }; \\ _Yifan Xie_, Nov 21 2024
%Y A376012 Cf. A085098, A118086, A277608.
%K A376012 hard,nonn,more
%O A376012 0,3
%A A376012 _Keith F. Lynch_, Sep 05 2024