OFFSET
1,1
COMMENTS
a(639) > 10^5. - Seiichi Manyama, Dec 22 2019
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..500
MATHEMATICA
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 *)
PROG
(Haskell)
toBinary 0 = []
toBinary n = toBinary (n `div` 2) ++ [odd n]
a = [2 + fromJust (findIndex (isPrefixOf (toBinary n)) [toBinary (n ^ k) | k <- [2..]]) | n <- [1..]]
(PARI) a(n)=my(b=binary(n), k=1); while(binary(n^k++)[1..#b]!=b, ); k \\ Charles R Greathouse IV, Jun 06 2013
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Vladimir Reshetnikov, May 01 2010
EXTENSIONS
More terms from Seiichi Manyama, Dec 22 2019
STATUS
approved