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.

Showing 1-1 of 1 results.

A244959 Smallest positive multiple of n whose base 8 representation contains only 0's and 1's.

Original entry on oeis.org

1, 8, 9, 8, 65, 72, 299593, 8, 9, 520, 4169, 72, 65, 2396744, 585, 64, 4097, 72, 513, 520, 17044041, 33352, 33281, 72, 266825, 520, 513, 2396744, 266249, 4680, 4681, 64, 32769, 32776, 16814665, 72, 262145, 4104, 585, 520, 32841, 136352328, 36937, 33352, 585
Offset: 1

Views

Author

Eric M. Schmidt, Jul 09 2014

Keywords

Crossrefs

Cf. A004288 (written in base 8), A004290, A244954-A244960.

Programs

  • Mathematica
    Module[{nn=10,b8},b8=Rest[FromDigits[#,8]&/@Tuples[{0,1},nn]];Table[SelectFirst[ b8,Mod[#,n]==0&],{n,100}]] (* Harvey P. Dale, Feb 03 2024 *)
  • Python
    def A244959(n):
        if n > 0:
            for i in range(1,2**n):
                x = int(bin(i)[2:],8)
                if not x % n:
                    return x
        return 0 # Chai Wah Wu, Dec 30 2014

Extensions

Data corrected, offset corrected, and b-file replaced by Harvey P. Dale, Feb 03 2024
Showing 1-1 of 1 results.