login
a(1) = 1, and for any n > 1, a(n) is the least k > 0 such that the binary representation of n^k starts with "10".
1

%I #13 Aug 22 2019 14:16:55

%S 1,1,2,1,1,2,3,1,1,1,1,2,2,3,5,1,1,1,1,1,1,1,1,2,2,2,2,3,3,5,10,1,1,1,

%T 1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,4,5,6,10,19,1,1,1,1,

%U 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

%N a(1) = 1, and for any n > 1, a(n) is the least k > 0 such that the binary representation of n^k starts with "10".

%C The sequence is well defined; for any n > 0:

%C - if n is a power of 2, then a(n) = 1,

%C - if n is not a power of 2, then log_2(n) is irrational,

%C hence the function k -> frac(k * log_2(n)) is dense in the interval [0, 1]

%C according to Weyl's criterion,

%C so for some k > 0, k*log_2(n) = m + 1 + e where m is a positive integer

%C and 0 <= e < log_2(3) - 1 < 1,

%C - hence 2 * 2^m <= n^k < 3 * 2^m and a(n) <= k, QED.

%H Rémy Sigrist, <a href="/A309736/a309736.png">Scatterplot of (x, y) such that the binary representation of x^y starts with "10" and x = 2..1024 and y = 1..1024</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/WeylsCriterion.html">Weyl's Criterion</a>

%F a(n) = 1 iff n belongs to A004754.

%F a(2*n) = a(n).

%F A090996(n^a(n)) = 1.

%e For n = 7:

%e - the first powers of 7, in decimal as well as in binary, are:

%e k 7^k bin(7^k)

%e - --- ---------

%e 1 7 111

%e 2 49 110001

%e 3 343 101010111

%e - hence a(7) = 3.

%o (PARI) a(n) = { my (nk=n); for (k=1, oo, if (binary(2*nk)[2]==0, return (k), nk *= n)) }

%Y Cf. A004754, A090996, A098174.

%K nonn,base

%O 1,3

%A _Rémy Sigrist_, Aug 14 2019