A353990 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that is coprime to a(n-1), does not equal a(n-1)+1, and whose binary expansion has no 1-bit in common with the binary expansion of a(n-1).
1, 4, 3, 8, 5, 2, 9, 16, 7, 24, 35, 12, 17, 6, 25, 32, 11, 20, 33, 10, 21, 34, 13, 18, 37, 26, 69, 40, 19, 36, 65, 14, 81, 38, 73, 22, 41, 64, 15, 112, 129, 28, 67, 44, 83, 128, 23, 72, 49, 66, 29, 96, 31, 160, 27, 68, 43, 80, 39, 88, 131, 48, 71, 56, 135, 104, 133, 50, 77, 130, 53, 74, 145, 42
Offset: 1
Examples
a(4) = 8 as a(3) = 3, and 8 has not yet appeared, is coprime to 3, is not 1 more than 3, while 8 = 1000_2 and 3 = 11_2 which have no 1-bits in common.
Links
- Scott R. Shannon, Image of the first 100000 terms. The green line is y = n.
Programs
-
Python
from math import gcd from itertools import count, islice def A353990_gen(): # generator of terms yield 1 a, s, b = 1, 2, set() while True: for i in count(s): if not (i == a+1 or i & a or gcd(i,a) > 1 or i in b): yield i a = i b.add(i) while s in b: s += 1 break A353990_list = list(islice(A353990_gen(),30)) # Chai Wah Wu, May 24 2022
Comments