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 A320441 #27 Oct 04 2023 17:22:31 %S A320441 3,7,10,15,21,31,36,42,45,54,63,73,85,91,109,127,136,146,153,170,173, %T A320441 181,182,187,204,219,221,238,255,273,292,307,341,365,375,409,438,443, %U A320441 477,511,528,546,561,585,594,614,627,660,682,685,693,725,726,731,750 %N A320441 Numbers whose binary expansion is quasiperiodic. %C A320441 The binary representation of a term (ignoring leading zeros) can be covered by (possibly overlapping) occurrences of one of its proper prefix. %C A320441 This sequence contains A121016. %C A320441 For any k > 0, there are A320434(k)/2 terms with binary length k. %H A320441 Michael S. Branicky, <a href="/A320441/b320441.txt">Table of n, a(n) for n = 1..10000</a> %H A320441 Rémy Sigrist, <a href="/A320441/a320441.png">Scatterplot of the first difference of the first 100000 terms</a> %F A320441 A020330(a(n)) belongs to the sequence for any n > 0. %F A320441 A297405(a(n)) belongs to the sequence for any n > 0. %e A320441 The first terms, alongside their binary representations and prefixes, are: %e A320441 n a(n) bin(a(n)) prefix %e A320441 -- ---- --------- ------ %e A320441 1 3 11 1 %e A320441 2 7 111 1 %e A320441 3 10 1010 10 %e A320441 4 15 1111 1 %e A320441 5 21 10101 101 %e A320441 6 31 11111 1 %e A320441 7 36 100100 100 %e A320441 8 42 101010 10 %e A320441 9 45 101101 101 %e A320441 10 54 110110 110 %e A320441 11 63 111111 1 %e A320441 12 73 1001001 1001 %o A320441 (PARI) isok(w) = { my (tt=0); for (l=1, oo, my (t=w%(2^l)); if (t!=tt, if (t==w, return (0)); my (r=w, g=l); while (g-->=0 && r>=t, r \= 2; if (r%(2^l)==t, if (r==t, return (1), g=l))); tt = t)) } %o A320441 (Python) %o A320441 def qp(w): %o A320441 for i in range(1, len(w)): %o A320441 prefix, covered = w[:i], set() %o A320441 for j in range(len(w)-i+1): %o A320441 if w[j:j+i] == prefix: %o A320441 covered |= set(range(j, j+i)) %o A320441 if covered == set(range(len(w))): %o A320441 return True %o A320441 return False %o A320441 def ok(n): return qp(bin(n)[2:]) %o A320441 print([k for k in range(751) if ok(k)]) # _Michael S. Branicky_, Mar 20 2022 %Y A320441 Cf. A020330, A121016, A297405, A320434. %K A320441 nonn,base %O A320441 1,1 %A A320441 _Rémy Sigrist_, Jan 09 2019