A382442 Lexicographically earliest sequence of positive integers such that for any n > 1, a(n) does not divide any of the positive numbers whose binary expansion appears as a contiguous subword in the concatenation of the previous terms.
1, 2, 4, 7, 8, 16, 18, 27, 32, 42, 54, 64, 84, 126, 128, 133, 172, 238, 256, 276, 379, 381, 444, 512, 524, 582, 621, 765, 948, 1024, 1048, 1179, 1241, 1449, 1496, 1557, 1861, 1896, 1982, 2048, 2132, 2155, 2227, 2386, 2667, 2900, 3013, 3058, 3236, 3444, 3613
Offset: 1
Examples
a(1) = 1. a(2) must not divide 1 ("1" in binary); we can take a(2) = 2. a(3) must not divide 1, 2, 3 or 6 ("1", "10", "11", "110" in binary); we can take a(3) = 4.
Links
- Rémy Sigrist, C++ program
Crossrefs
Cf. A382441 (decimal variant).
Programs
-
Python
from itertools import count, islice def agen(): # generator of terms an, s, d = 1, "1", {1} while True: yield an an = next(k for k in count(an+1) if not any(di%k == 0 for di in d)) for di in bin(an)[2:]: s += di d |= set(si for i in range(len(s)) if (si:=int(s[i:], 2)) > an) print(list(islice(agen(), 51))) # Michael S. Branicky, Mar 26 2025
Comments