[go: up one dir, main page]

login
A376584
Fixed points in A375564.
1
1, 2, 3, 4, 15, 51, 63, 363, 437, 729, 1385, 1388, 1413, 2807, 5418, 5422, 5428, 5435, 5451, 5537, 10790, 10795, 10803, 10871, 21505, 21507, 21899, 22081, 42969, 43073, 43387, 44069, 171631, 172889, 342493, 2747813, 5464783, 10908941, 10911583, 87259373, 87327187, 174579089
OFFSET
1,2
PROG
(Python)
from itertools import count, islice
from math import gcd
from sympy import isprime
def A376584_gen(): # generator of terms
aset, a, b = {1, 2}, 2, 3
yield from (1, 2)
for i in count(3):
c = b
if isprime(a):
while c in aset or gcd(c, a)>1:
c+=1
else:
while c in aset or gcd(c, a)==1:
c+=1
aset.add(a:=c)
if i == c:
yield i
while b in aset:
b += 1
A376584_list = list(islice(A376584_gen(), 20)) # Chai Wah Wu, Sep 30 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Sep 29 2024
EXTENSIONS
a(40)-a(42) from Scott R. Shannon, Oct 02 2024
STATUS
approved