%I #15 Feb 06 2020 12:17:20
%S 4,4,4,4,5,4,5,4,5,3,9,3,5,6,8,3,7,3,7,5,6,4,9,4,5,7,8,3,9,3,7,5,5,6,
%T 10,3,5,5,10,3,9,3,7,8,5,4,12,4,8,5,8,3,10,5,9,5,6,3,14,4,5,8,8,5,9,3,
%U 7,6,9,3,14,3,5,9,7,6,9,4,11,6,5,3,13
%N Number of positive integer solutions (x,y) to the equation x^y = y^(nx).
%C a(n) > d(n), where d(n) = A000005(n) is the number of divisors of n, because x = y = 1 is a solution for all n and for every divisor j of n, x = ((1 + 1/j)*n)^j, y = ((1 + 1/j)*n)^(j + 1) is a solution. The difference a(n) - d(n) can get arbitrarily large. The smallest n for which a(n) >= d(n) + 4 is n = 10800.
%H Pontus von Brömssen, <a href="/A331842/b331842.txt">Table of n, a(n) for n = 2..16384</a>
%e For n = 15, the 1 + d(n) = 5 "standard" solutions are (1, 1), (30, 30^2), (20^3, 20^4), (18^5, 18^6), and (16^15, 16^16). In addition to these, (5^3, 5^5) is a solution, so a(15) = 6.
%e For n = 10800, the 3 "nonstandard" solutions are (180, 180^3), (30^2, 30^5), and (108^25, 108^27), so a(10800) = d(n) + 4 = 64.
%o (Python)
%o import sympy
%o def A331842(n):
%o c=0
%o d=sympy.divisors(n)
%o i=2
%o while 2**i<=n*(1+i):
%o for j in d:
%o if sympy.gcd(i,j)==1:
%o e=sympy.perfect_power(n+i*n//j,[i])
%o if e and e[1]%i==0: # The divisibility test is not necessary from version 1.5 of sympy.
%o c+=1 # Count the solution (x,y)=(m^j,m^(j+i)), where m=e[0]**(e[1]//i).
%o i+=1
%o return c+1+len(d) # Add the number of "standard" solutions.
%Y Cf. A000005.
%K nonn
%O 2,1
%A _Pontus von Brömssen_, Jan 29 2020
|