[go: up one dir, main page]

login
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).
2

%I #14 May 24 2022 09:12:45

%S 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,

%T 69,40,19,36,65,14,81,38,73,22,41,64,15,112,129,28,67,44,83,128,23,72,

%U 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

%N 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).

%C This sequence is similar to A093714 with the additional restriction that no term can have a 1-bit in common with the previous term in their binary expansions. This leads to the terms showing similar behavior to A109812. See the linked image.

%C In the first 100000 terms the fixed points are 1, 3, 5, 12, 21, 26, 44, 49, 227, 3488, 5890, 9067, 9310, 37625, 74702, although it is likely more exist. In the same range the lowest unseen number is 30686; the sequence is conjectured to be a permutation of the positive integers.

%H Scott R. Shannon, <a href="/A353990/a353990.png">Image of the first 100000 terms</a>. The green line is y = n.

%e 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.

%o (Python)

%o from math import gcd

%o from itertools import count, islice

%o def A353990_gen(): # generator of terms

%o yield 1

%o a, s, b = 1, 2, set()

%o while True:

%o for i in count(s):

%o if not (i == a+1 or i & a or gcd(i,a) > 1 or i in b):

%o yield i

%o a = i

%o b.add(i)

%o while s in b:

%o s += 1

%o break

%o A353990_list = list(islice(A353990_gen(),30)) # _Chai Wah Wu_, May 24 2022

%Y Cf. A093714, A109812, A353989, A352763.

%K nonn,base

%O 1,2

%A _Scott R. Shannon_, May 13 2022