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.

A308705 Decimal expansion of the constant formed by concatenating the terms of A076478 (binary vectors of lengths 1, 2, 3, ... in numerical order).

Original entry on oeis.org

2, 7, 6, 3, 8, 7, 1, 1, 7, 2, 7, 9, 4, 8, 6, 5, 2, 3, 7, 3, 4, 1, 9, 8, 6, 7, 6, 2, 1, 1, 9, 0, 1, 2, 3, 0, 5, 5, 5, 0, 8, 9, 9, 8, 8, 1, 6, 0, 6, 8, 5, 5, 0, 6, 1, 4, 3, 6, 7, 6, 8, 1, 9, 1, 1, 5
Offset: 0

Views

Author

David McFadzean, Jun 18 2019

Keywords

Comments

The binary vectors "0,1,00,01,10,11,000,001,..." are concatenated into a constant "0.0100011011000001...", then converted to decimal.

Examples

			0.276387117279486523734198676211901230555089988160685506143676819115...
		

Crossrefs

Cf. A076478.

Programs

  • Mathematica
    m = 100; d[n_] := Rest@IntegerDigits[n + 1, 2] + 1; v = Flatten[Array[d, 4 m]] - 1; RealDigits[FromDigits[v, 2]/2^Length[v], 10, m][[1]] (* Amiram Eldar, Jul 05 2019 after Clark Kimberling at A076478 *)
  • Python
    from bigfloat import *
    import string
    def GenerateBitstring(bitstring, suffix, recurse):
        if recurse == 0:
            bitstring = bitstring + suffix
        else:
            bitstring = GenerateBitstring(bitstring, suffix + "0", recurse-1)
            bitstring = GenerateBitstring(bitstring, suffix + "1", recurse-1)
        return bitstring
    VulcanBinary = ""
    MaxRecursion = 8
    for i in range(1,MaxRecursion+1):
        VulcanBinary = GenerateBitstring(VulcanBinary, "", i)
    print('.' + VulcanBinary)
    with precision(2000):
        VulcanDecimal = BigFloat(0)
        b = BigFloat(1)
        for c in VulcanBinary:
            b = b/2.
            if c == '1':
                VulcanDecimal = VulcanDecimal+b
    print(VulcanDecimal)
    print(string.join(x + ',' for x in str(VulcanDecimal)[2:]))