OFFSET
1,8
COMMENTS
See the comment under A240226 for g-adic value of x and the Mahler reference, p. 7, where this exponent is called f.
REFERENCES
Kurt Mahler, p-adic numbers and their functions, second ed., Cambridge University Press, 1981.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
a(n) = 0 if n is odd, and if n is even a(n) = f(1/n) with f(1/n) the smallest positive integer such that the highest power of 2 in n (that is A006519(n)) divides 4^f(1/n).
a(n) = valuation(2*n, 4). - Andrew Howroyd, Jul 31 2018
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2/3. - Amiram Eldar, Jun 30 2023
EXAMPLE
MATHEMATICA
Array[IntegerExponent[2 #, 4] &, 105] (* Michael De Vlieger, Nov 06 2018 *)
PROG
(PARI) a(n) = valuation(2*n, 4); \\ Andrew Howroyd, Jul 31 2018
(Python)
def A244415(n): return (~n&n-1).bit_length()+1>>1 # Chai Wah Wu, Jul 09 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Jun 28 2014
STATUS
approved