OFFSET
1,1
COMMENTS
This is a permutation of the positive integers.
Apparently, a self-inverse permutation.
There are no fixed points.
LINKS
PROG
(Perl) See Link section.
(Python)
from itertools import count, islice
def agen(): # generator of terms
aset, mink = set(), 1
for n in count(1):
an = mink
while an in aset or n&an: an += 1
aset.add(an); yield an
while mink in aset: mink += 1
print(list(islice(agen(), 64))) # Michael S. Branicky, Jun 22 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Tek, Mar 05 2014
STATUS
approved