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.

A306287 Irregular triangle T(n,k), 1 <= n, 1 <= k <= (1/6)*(4+5*2^(2*n)), read by rows: T(n,k) determines absolute directions along the perimeter of the n-th Y-type Hilbert Tree.

Original entry on oeis.org

1, 0, 3, 2, 1, 2, 1, 1, 0, 3, 0, 1, 0, 3, 3, 2, 3, 2, 1, 2, 1, 0, 1, 2, 2, 3, 2, 1, 1, 0, 1, 2, 1, 1, 0, 3, 0, 1, 0, 3, 3, 2, 3, 0, 0, 0, 1, 2, 1, 1, 0, 3, 0, 1, 0, 3, 3, 2, 3, 0, 3, 3, 2, 1, 2, 2, 3, 0, 3, 2, 3, 2, 1, 2, 1, 0, 1, 2, 2, 3, 2, 1, 1, 1, 0
Offset: 1

Views

Author

Bradley Klee, Feb 03 2019

Keywords

Comments

The Y-type Hilbert trees are a sequence of polyominoes whose edges, all but one, are segments of the Hilbert curve described by A163540. One extra edge closes a loop around the perimeter (cf. Formula). The first Y-type tree is a monomino with four edges, and the second is the Y hexomino with 14 unit edges. All deeper trees are determined by iteration of replacement rules (cf. linked image "First Six Y-type Trees"). The Y-type Hilbert trees nest along the upper half plane according to the limit-periodic ruler function A001511. Such an arrangement reconstructs the Hilbert curve everywhere away from the ground axis (cf. linked image "Limit-Periodic Construction").

Examples

			T(1,k) = 1, 0, 3, 2;
T(2,k) = 1, 2, 1, 1, 0, 3, 0, 1, 0, 3, 3, 2, 3, 2.
		

Crossrefs

T-Type Trees: A306288. Cf. A163540, A001511, A246559.

Programs

  • Mathematica
    HC = {L[n_ /; EvenQ[n]] :> {F[n], L[n], L[Mod[n + 1, 2]], R[n]},
       R[n_ /; OddQ[n]] :> {F[n], R[n], R[Mod[n + 1, 2]], L[n]},
       R[n_ /; EvenQ[n]] :> {L[n], R[Mod[n + 1, 2]], R[n], F[Mod[n + 1, 2]]},
       L[n_ /; OddQ[n]] :> {R[n], L[Mod[n + 1, 2]], L[n], F[Mod[n + 1, 2]]},
       F[n_ /; EvenQ[n]] :> {L[n], R[Mod[n + 1, 2]], R[n], L[Mod[n + 1, 2]]},
       F[n_ /; OddQ[n]] :> {R[n], L[Mod[n + 1, 2]], L[n], R[Mod[n + 1, 2]]}};
    TurnMap = {F[] -> 0, L[] -> 1, R[_] -> -1};
    T1ind[1] = 1; T1ind[2] = 2; T1ind[n_] := 5*T1ind[n - 1] - 4*T1ind[n - 2];
    T1Vec[n_] := Append[Mod[FoldList[Plus, Flatten[Nest[# /. HC &, F[0],
            n] /. TurnMap][[T1ind[n] ;; -(T1ind[n] + 1)]]], 4], 2]
    Flatten[T1Vec /@ Range[5]]

Formula

a(n,(1/6)*(4+5*2^(2*n))) = 2;
a(n,k) = A163540( (1/12)*(8+7*2^(2*n)-3*(-1)^n *2^(2*n+1))-1+k ).