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

A085194 Terms of A085193 halved. The repeating part in the first differences of A057520.

Original entry on oeis.org

1, 3, 1, 2, 9, 1, 3, 1, 2, 5, 1, 2, 4, 29, 1, 3, 1, 2, 9, 1, 3, 1, 2, 5, 1, 2, 4, 13, 1, 3, 1, 2, 5, 1, 2, 4, 9, 1, 2, 4, 8, 101, 1, 3, 1, 2, 9, 1, 3, 1, 2, 5, 1, 2, 4, 29, 1, 3, 1, 2, 9, 1, 3, 1, 2, 5, 1, 2, 4, 13, 1, 3, 1, 2, 5, 1, 2, 4, 9, 1, 2, 4, 8, 37, 1, 3, 1, 2, 9, 1, 3, 1, 2, 5, 1, 2, 4, 13, 1, 3, 1, 2
Offset: 0

Views

Author

Antti Karttunen, Jun 14 2003

Keywords

Crossrefs

Partial sums: A085195. Records are given by A079319(n) = A085194(A000108(n+1)-1). Cf. A085189.

Formula

a(n) = A085193(n)/2.

A085183 a(n) = A053645(A057520(n)), i.e., the terms of A014486 without their most significant bit (1) and the least significant bit (0).

Original entry on oeis.org

0, 1, 2, 5, 6, 9, 10, 12, 21, 22, 25, 26, 28, 37, 38, 41, 42, 44, 49, 50, 52, 56, 85, 86, 89, 90, 92, 101, 102, 105, 106, 108, 113, 114, 116, 120, 149, 150, 153, 154, 156, 165, 166, 169, 170, 172, 177, 178, 180, 184, 197, 198, 201, 202, 204, 209, 210, 212, 216, 225
Offset: 1

Views

Author

Antti Karttunen, Jun 14 2003

Keywords

Crossrefs

Same sequence in base 4: A085184.

A194045 Numbers whose binary expansion is a preorder traversal of a binary tree.

Original entry on oeis.org

0, 4, 20, 24, 84, 88, 100, 104, 112, 340, 344, 356, 360, 368, 404, 408, 420, 424, 432, 452, 456, 464, 480, 1364, 1368, 1380, 1384, 1392, 1428, 1432, 1444, 1448, 1456, 1476, 1480, 1488, 1504, 1620, 1624, 1636, 1640, 1648, 1684, 1688, 1700, 1704, 1712, 1732, 1736, 1744, 1760, 1812, 1816, 1828, 1832, 1840, 1860, 1864, 1872, 1888, 1924, 1928, 1936, 1952, 1984
Offset: 0

Views

Author

Mike Stay, Aug 13 2011

Keywords

Comments

When traversing the tree in preorder, emit 1 at each node and 0 if it has no child on the current branch. The smallest binary tree is empty, so we emit 0 at the root; thus a(0) = 0. The next binary tree is a single node (emit 1) with no left (emit 0) or right child (emit 0); thus a(1) = 100 in binary or 4.

Crossrefs

Cf. A000108.

Programs

  • JavaScript
    // n is the number of internal nodes (or 1s in the binary expansion)
    // f is a function to display each result
    function trees(n, f) {
      // h is the "height", thinking of 1 as a step up and 0 as a step down
      // s is the current state
      function enumerate(n, h, s, f) {
        if (n===0 && h===0) { f(2 * s); }
        else {
          if (h > 0) { enumerate(n, h - 1, 2 * s, f) }
          if (n > 0) { enumerate(n - 1, h + 1, 2 * s + 1, f) }
        }
      }
      enumerate(n, 0, 0, f);
    }

Formula

a(n) = 4 * A057520(n). [Joerg Arndt, Sep 22 2012]
a(0)=0, a(n) = 2 * A014486(n) for n>=1. [Joerg Arndt, Sep 22 2012]
Showing 1-3 of 3 results.