[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A351705
For any nonnegative number n with binary expansion Sum_{k >= 0} b_k * 2^k, a(n) is the numerator of d(n) = Sum_{k >= 0} b_k * 2^A130472(k). See A351706 for the denominators.
4
0, 1, 1, 3, 2, 3, 5, 7, 1, 5, 3, 7, 9, 13, 11, 15, 4, 5, 9, 11, 6, 7, 13, 15, 17, 21, 19, 23, 25, 29, 27, 31, 1, 9, 5, 13, 17, 25, 21, 29, 3, 11, 7, 15, 19, 27, 23, 31, 33, 41, 37, 45, 49, 57, 53, 61, 35, 43, 39, 47, 51, 59, 55, 63, 8, 9, 17, 19, 10, 11, 21
OFFSET
0,4
COMMENTS
The function d is a bijection from the nonnegative integers to the nonnegative dyadic rationals satisfying d(A000695(n)) = n for any n >= 0.
FORMULA
a(A000695(n)) = n.
a(2^k) = A072345(k-1) for any k > 0.
a(2^k-1) = 2^k-1 for any k >= 0.
A000120(a(n)) = A000120(n).
EXAMPLE
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) = 13.
PROG
(PARI) a(n) = { my (d=0, k); while (n, n-=2^k=valuation(n, 2); d+=2^((-1)^k*(k+1)\2)); numerator(d) }
CROSSREFS
KEYWORD
nonn,base,frac
AUTHOR
Rémy Sigrist, Feb 16 2022
STATUS
approved