OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} k * d(k) = 1.62390224555724623579..., where d(k) = Sum_{m>=0} phi(2*m+1)/((2*m+1)*odd(k)*2^(k*(2*m+1))) is the asymptotic density of the occurrences of k in this sequence, phi(k) = A000010(k) is the Euler totient function, and odd(k) = A000265(k) is the odd part of k. Equivalently, the asymptotic mean is Sum_{m>=0} (phi(2*m+1)/(2*m+1)) * Sum_{k>=1} 1/2^(k*(2*m+1)-v_2(k)), where v_2(k) = A007814(k).
MATHEMATICA
a[n_] := GCD[n, IntegerExponent[n, 2] + 1]; Array[a, 100]
PROG
(PARI) a(n) = gcd(n, valuation(n, 2) + 1);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Dec 10 2024
STATUS
approved