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 A177047 #19 Dec 22 2019 19:11:26 %S A177047 2,2,3,2,8,3,6,2,7,20,12,8,4,6,11,2,13,7,86,26,19,12,3,13,15,11,5,6,8, %T A177047 22,22,2,24,24,9,7,25,106,348,29,15,24,55,25,60,87,93,13,84,15,4,11, %U A177047 12,5,33,58,324,8,18,33,44,66,45,2,46,24,92,24,38,32,128,7,59,44,36,114,16,404 %N A177047 Least k>1 such that n^k starts with n in base 2. %C A177047 a(639) > 10^5. - _Seiichi Manyama_, Dec 22 2019 %H A177047 Seiichi Manyama, <a href="/A177047/b177047.txt">Table of n, a(n) for n = 1..500</a> %t A177047 a[n_] := For[k = 2, True, k++, If[ MatchQ[ IntegerDigits[n^k, 2], {Sequence @@ IntegerDigits[n, 2], ___}], Return[k]]]; a /@ Range[59] (* _Jean-François Alcover_, Jun 05 2013 *) %o A177047 (Haskell) %o A177047 toBinary 0 = [] %o A177047 toBinary n = toBinary (n `div` 2) ++ [odd n] %o A177047 a = [2 + fromJust (findIndex (isPrefixOf (toBinary n)) [toBinary (n ^ k) | k <- [2..]]) | n <- [1..]] %o A177047 (PARI) a(n)=my(b=binary(n),k=1);while(binary(n^k++)[1..#b]!=b,);k \\ _Charles R Greathouse IV_, Jun 06 2013 %Y A177047 Cf. A051248, A177048. %K A177047 base,easy,nonn %O A177047 1,1 %A A177047 _Vladimir Reshetnikov_, May 01 2010 %E A177047 More terms from _Seiichi Manyama_, Dec 22 2019