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.

A161153 Positive integers that are coprime to their number of digits in binary representation.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 11, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 27, 28, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96, 97, 99, 100, 101, 102, 103, 104, 106
Offset: 1

Views

Author

Leroy Quet, Jun 03 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[106], GCD[Length[IntegerDigits[#, 2]], #]==1 &] (* Indranil Ghosh, Mar 08 2017 *)
  • PARI
    for(n=1, 106, if(gcd(#digits(n, 2), n)==1, print1(n,", "))) \\ Indranil Ghosh, Mar 08 2017
    
  • Python
    from math import gcd
    i=1
    j=1
    while j<=100:
        if gcd(len(bin(i)[2:]),i)==1:
            print(j, i)
            j+=1
        i+=1 # Indranil Ghosh, Mar 08 2017

Extensions

Extended by Ray Chandler, Jun 11 2009
Name edited by Michel Marcus, Apr 30 2021