login
A309736
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
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, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
1,3
COMMENTS
The sequence is well defined; for any n > 0:
- if n is a power of 2, then a(n) = 1,
- if n is not a power of 2, then log_2(n) is irrational,
hence the function k -> frac(k * log_2(n)) is dense in the interval [0, 1]
according to Weyl's criterion,
so for some k > 0, k*log_2(n) = m + 1 + e where m is a positive integer
and 0 <= e < log_2(3) - 1 < 1,
- hence 2 * 2^m <= n^k < 3 * 2^m and a(n) <= k, QED.
FORMULA
a(n) = 1 iff n belongs to A004754.
a(2*n) = a(n).
A090996(n^a(n)) = 1.
EXAMPLE
For n = 7:
- the first powers of 7, in decimal as well as in binary, are:
k 7^k bin(7^k)
- --- ---------
1 7 111
2 49 110001
3 343 101010111
- hence a(7) = 3.
PROG
(PARI) a(n) = { my (nk=n); for (k=1, oo, if (binary(2*nk)[2]==0, return (k), nk *= n)) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Aug 14 2019
STATUS
approved