OFFSET
1,2
COMMENTS
In the first 100000 terms the primes 11, 7 and 5 appear in reverse order, but all others appear in their natural order. In the same range the fixed points begin 1, 2, 4, 13, 294, 295, 296, 299, 304, 309, 640, 649. 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(3) = 27 as a(2) = 2 and 27 is the smallest unused number that is coprime to 2, sopfr(27) = 9 is coprime to sopfr(2) = 2, and Omega(27) = 3 does not equal Omega(2) = 1.
PROG
(Python)
from math import gcd
from sympy import factorint
from functools import cache
from itertools import count, islice
@cache
def sW(n):
f = factorint(n)
return (sum(p*e for p, e in f.items()), sum(f.values()))
def agen(): # generator of terms
yield 1
aset, an, mink = {1, 2}, 2, 3
while True:
yield an
s, W = sW(an)
an = next(k for k, sk, Wk in ((k, )+sW(k) for k in count(mink)) if k not in aset and gcd(k, an)==1 and gcd(sk, s)==1 and Wk!=W)
aset.add(an)
while mink in aset: mink += 1
print(list(islice(agen(), 76))) # Michael S. Branicky, Feb 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Feb 20 2024
STATUS
approved