OFFSET
1,2
COMMENTS
Here uphi(n) = A047994(n) is the unitary totient function: if n = Product p_i^e_i, uphi(n) = Product (p_i^e_i - 1).
Solutions sorted by increasing r, then increasing s. - Sean A. Irvine, Sep 29 2025
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..66
PROG
(Python)
from math import prod
from sympy import factorint
from itertools import count, islice
def uphi(n): return prod(p_i**e_i-1 for p_i, e_i in factorint(n).items())
def agen(): # generator of terms
uphi_level_sets = dict()
for r in count(1):
v = uphi(r)
if v in uphi_level_sets:
for s in uphi_level_sets[v]:
k, rem = divmod(r*s, v*(r-s))
if rem == 0:
yield s
else:
uphi_level_sets[v] = []
uphi_level_sets[v].append(r)
print(list(islice(agen(), 25))) # Michael S. Branicky, Sep 30 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Kohmoto found 2nd, 6th, 13th, 25th terms. Dean Hickerson calculated the other terms.
Offset corrected and ordering defined by Sean A. Irvine, Sep 29 2025
a(31) and beyond from Michael S. Branicky, Sep 29 2025
STATUS
approved
