A351706 For any nonnegative number n with binary expansion Sum_{k >= 0} b_k * 2^k, a(n) is the denominator of d(n) = Sum_{k >= 0} b_k * 2^A130472(k). See A351705 for the numerators.
1, 1, 2, 2, 1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 2, 2, 1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 1, 2, 2, 1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 2, 2, 1, 1, 2
Offset: 0
Examples
For n = 13: - 13 = 2^0 + 2^2 + 2^3, - A130472(0) = 0, A130472(2) = 1, A130472(3) = -2, - d(13) = 2^0 + 2^1 + 2^-2 = 13/4, - so a(13) = 4.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8191
- Wikipedia, Dyadic rational
- Index entries for sequences related to binary expansion of n
Programs
-
PARI
a(n) = { my (d=0, k); while (n, n-=2^k=valuation(n,2); d+=2^((-1)^k*(k+1)\2)); denominator(d) }
Comments