OFFSET
1,2
COMMENTS
This sequence is a self-inverse permutation of the positive integers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..12000
Rémy Sigrist, Scatterplot of the first 120000 terms
Rémy Sigrist, PARI program
PROG
(PARI) \\ See Links section.
(Python)
from itertools import count, islice
def agen(): # generator of terms
aset, m = set(), 1
for n in count(1):
n1 = int(str(n)[0])
an = next(k for k in count(m) if k not in aset and (k%n1 == 0 or n%int(str(k)[0]) == 0))
yield an
aset.add(an)
while m in aset: m += 1
print(list(islice(agen(), 67))) # Michael S. Branicky, Jan 27 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 24 2025
STATUS
approved
