cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A099247 Numbers such that, in binary representation, the length and the number of ones are coprime.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 08 2004

Keywords

Crossrefs

Complement of A099248.

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