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.

A300570 a(n) is the concatenation n in base 2, n-1 in base 2, ..., 1 in base 2.

Original entry on oeis.org

1, 101, 11101, 10011101, 10110011101, 11010110011101, 11111010110011101, 100011111010110011101, 1001100011111010110011101, 10101001100011111010110011101, 101110101001100011111010110011101, 1100101110101001100011111010110011101
Offset: 1

Views

Author

Seiichi Manyama, Mar 08 2018

Keywords

Crossrefs

Cf. A098780 (decimal expansion of terms).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 1,
          parse(cat(convert(n, binary), a(n-1))))
        end:
    seq(a(n), n=1..12);  # Alois P. Heinz, Feb 19 2023
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits[#,2]&/@Range[n,1,-1]]],{n,20}] (* Harvey P. Dale, Sep 07 2020 *)
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        s = ""
        for k in count(1):
            s = bin(k)[2:] + s
            yield int(s)
    print(list(islice(agen(), 15))) # Michael S. Branicky, Feb 19 2023
    
  • Python
    from functools import reduce
    def A300570(n): return int(bin(reduce(lambda i,j:(i<Chai Wah Wu, Feb 26 2023
Showing 1-1 of 1 results.