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 A240226 #28 Oct 24 2023 04:35:06 %S A240226 1,4,1,4,1,4,1,16,1,4,1,4,1,4,1,16,1,4,1,4,1,4,1,16,1,4,1,4,1,4,1,64, %T A240226 1,4,1,4,1,4,1,16,1,4,1,4,1,4,1,16,1,4,1,4,1,4,1,16,1,4,1,4,1,4,1,64, %U A240226 1,4,1,4,1,4,1,16,1,4,1,4,1,4,1,16,1,4,1,4,1,4,1,16,1,4 %N A240226 4-adic value of 1/n, n >= 1. %C A240226 For the definition of g-adic value of x, called |x|_g with g an integer >= 2, see the Mahler reference, p. 7. Sometimes also called g-adic absolute value of x. If g is not a prime then this is called a non-archimedean pseudo-valuation. See Mahler, p. 10. %D A240226 Kurt Mahler, p-adic numbers and their functions, second ed., Cambridge University Press, 1981. %H A240226 Antti Karttunen, <a href="/A240226/b240226.txt">Table of n, a(n) for n = 1..16383</a> %F A240226 a(n) = 1 if n is odd. a(n) = 4^f(1/n) if n is even, where f(1/n) is the smallest positive integer such that the highest power of 2 in n (that is A006519(n)) divides 4^f(1/n). The f(1/n) values are given in A244415(n). %F A240226 From _Andrew Howroyd_, Jul 31 2018: (Start) %F A240226 a(n) = 4^valuation(2*n, 4) = 4^A244415(n). %F A240226 Multiplicative with a(2^e) = 4^ceiling(e/2), a(p^e) = 1 for odd prime p. (End) %F A240226 From _Amiram Eldar_, Oct 24 2023: (Start) %F A240226 Dirichlet g.f.: zeta(s)*(2^s-1)*(2^s+4)/(4^s-4). %F A240226 Sum_{k=1..n} a(k) ~ (3/(4*log(2))) * n * (log(n) + gamma + 4*log(2)/3 - 1), where gamma is Euler's constant (A001620). (End) %e A240226 n = 2: A006519(2) = 1, 2 divides 4^1, hence f(1/2) = 1 and a(2) = 4^1 = 4. %e A240226 n = 4: A006519(4) = 2^2, 4 divides 4^1, hence f(1/4) = 1 and a(4) = 4. %e A240226 n = 8: A006519(8) = 2^3, 8 does not divide 4^1 but 4^2, hence f(1/8) = 2 and a(8) = 4^2 = 16. %t A240226 Array[4^IntegerExponent[2 #, 4] &, 90] (* _Michael De Vlieger_, Nov 06 2018 *) %o A240226 (PARI) a(n) = 4^ceil(valuation(n, 2)/2); \\ _Andrew Howroyd_, Jul 31 2018 %o A240226 (Python) %o A240226 def A240226(n): return 1<<((~n&n-1).bit_length()+1&-2) # _Chai Wah Wu_, Jul 09 2023 %Y A240226 Cf. A001620, A006519, A038500 (3-adic value of 1/n), A244415. %K A240226 nonn,easy,mult %O A240226 1,2 %A A240226 _Wolfdieter Lang_, Jun 28 2014