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 A337224 #12 Aug 22 2020 18:51:04 %S A337224 0,1,2,1,2,5,2,1,2,5,2,5,4,5,2,1,2,5,10,9,4,5,10,5,6,9,6,11,4,5,2,1,2, %T A337224 5,10,11,4,9,18,9,8,9,2,11,20,5,10,5,6,13,18,19,12,13,6,13,8,9,10,11, %U A337224 4,5,2,1,2,5,10,11,20,17,22,17,8,9,18,19,36,37 %N A337224 a(n) is the least number that can be obtained by replacing some repetitive part X^k in the binary expansion of n by X. %C A337224 Leading zeros in binary expansions are ignored. %C A337224 There are four fixed points: 0, 1, 2 and 5; their binary expansion is a squarefree string. %H A337224 Rémy Sigrist, <a href="/A337224/b337224.txt">Table of n, a(n) for n = 0..8192</a> %H A337224 Rémy Sigrist, <a href="/A337224/a337224.gp.txt">PARI program for A337224</a> %H A337224 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A337224 a(n) = 1 iff n = 2^k-1 for some k > 0. %e A337224 The first terms, in decimal and in binary, are: %e A337224 n a(n) bin(n) bin(a(n)) %e A337224 -- ---- ------ --------- %e A337224 0 0 0 0 %e A337224 1 1 1 1 %e A337224 2 2 10 10 %e A337224 3 1 11 1 %e A337224 4 2 100 10 %e A337224 5 5 101 101 %e A337224 6 2 110 10 %e A337224 7 1 111 1 %e A337224 8 2 1000 10 %e A337224 9 5 1001 101 %e A337224 10 2 1010 10 %e A337224 11 5 1011 101 %e A337224 12 4 1100 100 %e A337224 13 5 1101 101 %e A337224 14 2 1110 10 %e A337224 15 1 1111 1 %e A337224 16 2 10000 10 %o A337224 (PARI) See Links section. %Y A337224 Cf. A337222, A337223. %K A337224 nonn,base %O A337224 0,3 %A A337224 _Rémy Sigrist_, Aug 19 2020