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-2 of 2 results.

A350215 A048715, written in binary.

Original entry on oeis.org

0, 1, 10, 100, 1000, 1001, 10000, 10001, 10010, 100000, 100001, 100010, 100100, 1000000, 1000001, 1000010, 1000100, 1001000, 1001001, 10000000, 10000001, 10000010, 10000100, 10001000, 10001001, 10010000, 10010001, 10010010, 100000000, 100000001, 100000010
Offset: 0

Views

Author

A.H.M. Smeets, Dec 19 2021

Keywords

Comments

Narayana weighted representation of n (the top version).
a(n) equals binary representation of m, if and only if A350311(m) = n and for all k > m A350311(k) > n.

Crossrefs

Fibonacci representations: A014417 (Zeckendorf), A104326 (dual Zeckendorf).

Programs

  • Mathematica
    bin[n_] := FromDigits[IntegerDigits[n, 2]]; q[n_] := BitAnd[n, 6*n] == 0; bin /@ Select[Range[0, 250], q] (* Amiram Eldar, Jan 27 2022 *)
  • Python
    def c(b): return not "11" in b and not "101" in b
    def auptod(digits):
        return [int(b) for b in (bin(k)[2:] for k in range(2**digits)) if c(b)]
    print(auptod(9)) # Michael S. Branicky, Dec 20 2021

Formula

Regular expression 0|(1000*)*10*.

A350311 Replace 2^k in the binary expansion of n with A000930(k+2), Narayana's cows sequence.

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 5, 6, 4, 5, 6, 7, 7, 8, 9, 10, 6, 7, 8, 9, 9, 10, 11, 12, 10, 11, 12, 13, 13, 14, 15, 16, 9, 10, 11, 12, 12, 13, 14, 15, 13, 14, 15, 16, 16, 17, 18, 19, 15, 16, 17, 18, 18, 19, 20, 21, 19, 20, 21, 22, 22, 23, 24, 25, 13, 14, 15, 16, 16, 17
Offset: 0

Views

Author

A.H.M. Smeets, Dec 24 2021

Keywords

Comments

A048715(n) = m, if and only if a(n) = m and for all k > n a(k) > m.

Crossrefs

Cf. A022290 (analog for Fibonacci numbers).

Programs

  • Maple
    b:= (n, i, j, k)->`if`(n=0, 0, k*irem(n, 2, 'q')+b(q, j, k, i+k)):
    a:= n-> b(n, 1$3):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jan 26 2022
  • PARI
    my(p=Mod('x,'x^3-'x^2-1)); a(n) = vecsum(Vec(lift(subst(Pol(binary(n))*'x^2,'x,p)))); \\ Kevin Ryde, Dec 26 2021
  • Python
    def Interpretation(n):
        f0, f1, f2, r = 1, 1, 1, 0
        while n > 0:
            if n%2 == 1:
                r = r+f0
            n, f0, f1, f2 = n//2, f0+f2, f0, f1
        return r
    n = 0
    while n <= 69:
        print(Interpretation(n), end = ", ")
        n += 1
    
Showing 1-2 of 2 results.