[go: up one dir, main page]

login
A366160
Numbers whose binary expansion is not quasiperiodic.
0
1, 2, 4, 5, 6, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79
OFFSET
1,2
COMMENTS
See A320441 for the definition of quasiperiodic.
All numbers 2^k + 1 >= 5 are terms (A000051).
All powers of 2 are terms (A000079).
PROG
(Python)
A000225 = lambda n: (1 << n) - 1
def isA320441(k):
# Code after Michael S. Branicky, Mar 24 2022 in A320434.
tt, l = 1, k.bit_length()
for x in range(0, l + 1):
m = A000225(x)
t = k & m
if (t != tt):
if (t == k): return False
r = k
for g in range(0, x):
r >>= 1
if (r & m == t) and (r == t): return True
tt = t
print([n for n in range(1, 80) if not isA320441(n)])
CROSSREFS
Cf. A000051, A000079, A000225, A320441 (complement).
Sequence in context: A171599 A328594 A346129 * A288174 A280998 A043687
KEYWORD
nonn,base
AUTHOR
DarĂ­o Clavijo, Oct 02 2023
STATUS
approved