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.

A257345 Regard the terms of A004290 as binary numbers and convert to base 10.

Original entry on oeis.org

0, 1, 2, 7, 4, 2, 14, 9, 8, 511, 2, 3, 28, 9, 18, 14, 16, 29, 1022, 25, 4, 21, 6, 53, 56, 4, 18, 895, 36, 109, 14, 59, 32, 63, 58, 18, 2044, 7, 50, 21, 8, 31, 42, 109, 12, 1022, 106, 19, 112, 97, 4, 35, 36, 35, 1790, 6, 72, 25, 218, 223, 28, 37, 118, 991, 64
Offset: 0

Views

Author

N. J. A. Sloane, Apr 29 2015

Keywords

Comments

Of course the terms of A004290 are already in base 10 (they just happen to involve only the digits 0 and 1), so there is no justification for this sequence other than curiosity.
a(n) < 2^n. - Chai Wah Wu, Apr 29 2015

Crossrefs

Programs

  • Mathematica
    s = With[{c = Rest[Union[FromDigits /@ Flatten[Table[Tuples[{1, 0}, i], {i, 10}], 1]]]}, Join[{0}, Flatten[Table[Select[c, Divisible[#, n] &, 1], {n, 120}]]]]; FromDigits[IntegerDigits@ #, 2] & /@ s (* Michael De Vlieger, Apr 29 2015, after Harvey P. Dale at A004290 *)
  • Python
    def A257345(n):
        if n > 0:
            for i in range(1, 2**n):
                x = int(format(i, 'b'))
                if not x % n:
                    return int(str(x), 2)
        return 0 # Chai Wah Wu, Apr 29 2015

Extensions

More terms from Chai Wah Wu, Apr 29 2015