This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A366160 #48 Oct 09 2023 12:07:25 %S A366160 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, %T A366160 32,33,34,35,37,38,39,40,41,43,44,46,47,48,49,50,51,52,53,55,56,57,58, %U A366160 59,60,61,62,64,65,66,67,68,69,70,71,72,74,75,76,77,78,79 %N A366160 Numbers whose binary expansion is not quasiperiodic. %C A366160 See A320441 for the definition of quasiperiodic. %C A366160 All numbers 2^k + 1 >= 5 are terms (A000051). %C A366160 All powers of 2 are terms (A000079). %o A366160 (Python) %o A366160 A000225 = lambda n: (1 << n) - 1 %o A366160 def isA320441(k): %o A366160 # Code after _Michael S. Branicky_, Mar 24 2022 in A320434. %o A366160 tt, l = 1, k.bit_length() %o A366160 for x in range(0, l + 1): %o A366160 m = A000225(x) %o A366160 t = k & m %o A366160 if (t != tt): %o A366160 if (t == k): return False %o A366160 r = k %o A366160 for g in range(0, x): %o A366160 r >>= 1 %o A366160 if (r & m == t) and (r == t): return True %o A366160 tt = t %o A366160 print([n for n in range(1,80) if not isA320441(n)]) %Y A366160 Cf. A000051, A000079, A000225, A320441 (complement). %K A366160 nonn,base %O A366160 1,2 %A A366160 _DarĂo Clavijo_, Oct 02 2023