A099247 Numbers such that, in binary representation, the length and the number of ones are coprime.
1, 2, 4, 5, 6, 8, 11, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 47, 55, 59, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103
Offset: 1
Links
Programs
-
Haskell
a099247 n = a099247_list !! (n-1) a099247_list = filter ((== 1) . a099244) [1..] -- Reinhard Zumkeller, Oct 10 2013
-
Mathematica
Select[Range[150],CoprimeQ[IntegerLength[#,2],DigitCount[#,2,1]]&] (* Harvey P. Dale, Sep 22 2012 *)
-
PARI
isok(k) = {my(b = binary(k)); gcd(#b, vecsum(b)) == 1;} \\ Amiram Eldar, Jul 26 2025
Formula
A099244(a(n)) = 1.
Extensions
Definition clarified by Harvey P. Dale, Sep 22 2012