The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099249 Number of numbers not greater than n such that length in binary representation and number of ones are coprime. 3

%I #16 Jul 16 2023 02:07:19

%S 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,

%T 23,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,

%U 26,26,26,27,27,27,27,28,28,29,30,30,31,32,33,34,35,36,37,38,39,40,41

%N Number of numbers not greater than n such that length in binary representation and number of ones are coprime.

%C Number of numbers m<=n such that A099244(m) = 1.

%H Reinhard Zumkeller, <a href="/A099249/b099249.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>.

%F a(n) = Sum_{k=1..n} (A063524(A099244(k)). - _Reinhard Zumkeller_, Oct 10 2013

%t Accumulate[Table[Boole[CoprimeQ[BitLength[n], DigitCount[n, 2, 1]]], {n, 1, 100}]] (* _Amiram Eldar_, Jul 16 2023 *)

%o (Haskell)

%o a099249 n = a099249_list !! (n-1)

%o a099249_list = scanl1 (+) $ map ((0 ^) . (subtract 1)) a099244_list

%o -- _Reinhard Zumkeller_, Oct 10 2013

%Y Cf. A000120, A007088, A070939, A099244, A099247.

%K nonn,base

%O 1,2

%A _Reinhard Zumkeller_, Oct 08 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 21:53 EDT 2024. Contains 373110 sequences. (Running on oeis4.)