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

A099249
Number of numbers not greater than n such that length in binary representation and number of ones are coprime.
3
1, 2, 2, 3, 4, 5, 5, 6, 6, 6, 7, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41
OFFSET
1,2
COMMENTS
Number of numbers m<=n such that A099244(m) = 1.
FORMULA
a(n) = Sum_{k=1..n} A063524(A099244(k)). - Reinhard Zumkeller, Oct 10 2013
MATHEMATICA
Accumulate[Table[Boole[CoprimeQ[BitLength[n], DigitCount[n, 2, 1]]], {n, 1, 100}]] (* Amiram Eldar, Jul 16 2023 *)
PROG
(Haskell)
a099249 n = a099249_list !! (n-1)
a099249_list = scanl1 (+) $ map ((0 ^) . (subtract 1)) a099244_list
-- Reinhard Zumkeller, Oct 10 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Oct 08 2004
STATUS
approved