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”).

A064895
Binary concentration of n. Replace 2^e_k with 2^(e_k/g(n)) in binary expansion of n, where g(n) = GCD of exponents e_k = A064894(n).
4
0, 1, 2, 3, 2, 3, 6, 7, 2, 3, 10, 11, 12, 13, 14, 15, 2, 3, 18, 19, 6, 7, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 2, 3, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 2, 3, 66, 67, 10, 11, 70, 71, 6, 7, 74, 75
OFFSET
0,3
LINKS
FORMULA
If n = 2^(g(n)e0) + 2^(g(n)e1) +... then a(n) = 2^e0 + 2^e1 +...
EXAMPLE
577 = 2^0 + 2^6 + 2^9, GCD(0,6,9) = 3, a(577) = 2^(0/3)+2^(6/3)+2^(9/3) = 13.
MATHEMATICA
A064895[n_] := With[{e = Flatten[Position[Reverse[IntegerDigits[n, 2]], 1]] - 1}, Total[2^(e/Max[Apply[GCD, e], 1])]];
Array[A064895, 100, 0] (* Paolo Xausa, Feb 13 2024 *)
PROG
(PARI) a(n) = { my (b=vector(hammingweight(n))); for (i=1, #b, n-=2^b[i]=valuation(n, 2); ); b /= max(1, gcd(b)); sum(i=1, #b, 2^b[i]); } \\ Rémy Sigrist, Oct 16 2022
CROSSREFS
Sequence in context: A165930 A300500 A339132 * A120877 A326304 A174091
KEYWORD
base,easy,nonn
AUTHOR
Marc LeBrun, Oct 11 2001
STATUS
approved