OFFSET
1,2
COMMENTS
In the first 100000 terms the primes appear in their natural order. In the same range the fixed points begin 1, 2, 3, 4, 5, 20, 134, 136, 403, 598, 608, 649, 667. The sequence is conjectured to be a permutation of the positive numbers.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..10000
EXAMPLE
a(9) = 8 as a(8) = 11 and 8 is the smallest unused number that is coprime to 11, while sopfr(8) = 6 is coprime to sopfr(11) = 11.
PROG
(Python)
from math import gcd
from sympy import factorint
from functools import cache
from itertools import count, islice
@cache
def sopfr(n): return sum(p*e for p, e in factorint(n).items())
def agen(): # generator of terms
yield 1
aset, an, mink = {1, 2}, 2, 3
while True:
yield an
s = sopfr(an)
an = next(k for k in count(mink) if k not in aset and gcd(k, an)==1 and gcd(sopfr(k), s)==1)
aset.add(an)
while mink in aset: mink += 1
print(list(islice(agen(), 77))) # Michael S. Branicky, Feb 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Feb 20 2024
STATUS
approved