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

A059252 Hilbert's Hamiltonian walk on N X N projected onto x axis: m(3).

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 3, 2, 2, 3, 3, 2, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 2, 2, 3, 3, 3, 2, 2, 3, 4, 5, 5, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 6, 6, 7, 7, 7, 6, 6, 5, 4, 4, 5, 5, 4, 4, 5, 6, 6, 7, 7, 8, 9, 9, 8, 8, 8, 9, 9, 10, 10, 11, 11, 11, 10, 10, 11, 12, 12, 13, 13, 14, 15, 15, 14, 14, 15, 15, 14
Offset: 0

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Jan 23 2001

Keywords

Comments

This is the X-coordinate of the n-th term in Hilbert's Hamiltonian walk A163359 and the Y-coordinate of its transpose A163357.

Examples

			[m(1)=0 0 1 1, m'(1)= 0 1 10] [m(2) =0 0 1 1 2 3 3 2 2 3 3 2 1 1 0 0, m'(2)=0 1 1 0 0 0 1 1 2 2 3 3 3 2 2 3].
		

Crossrefs

See also the y-projection, m'(3), A059253, as well as: A163539, A163540, A163542, A059261, A059285, A163547 and A163529.

Programs

  • C
    void h(unsigned int *x, unsigned int *y, unsigned int l){
    x[0] = y[0] = 0; unsigned int *t = NULL; unsigned int n = 0, k = 0;
    for(unsigned int i = 1; i>(2*n)){
    case 1: x[i] = y[i&k]; y[i] = x[i&k]+(1<Jared Rager, Jan 09 2021 */
    (C++) See Fxtbook link.

Formula

Initially [m(0) = 0, m'(0) = 0]; recursion: m(2n + 1) = m(2n).m'(2n).f(m'(2n), 2n).c(m(2n), 2n + 1); m'(2n + 1) = m'(2n).f(m(2n), 2n).f(m(2n), 2n).mir(m'(2n)); m(2n) = m(2n - 1).f(m'(2n - 1), 2n - 1).f(m'(2n - 1), 2n - 1).mir(m(2n - 1)); m'(2n) = m'(2n - 1).m(2n - 1).f(m(2n - 1), 2n - 1).c(m'(2n - 1), 2n); where f(m, n) is the alphabetic morphism i := i + 2^n [example: f(0 0 1 1 2 3 3 2 2 3 3 2 1 1 0 0, 2) = 4 4 5 5 6 7 7 6 6 7 7 6 5 5 4 4]; c(m, n) is the complementation to 2^n - 1 alphabetic morphism [example: c(0 0 1 1 2 3 3 2 2 3 3 2 1 1 0 0, 3) = 7 7 6 6 5 4 4 5 5 4 4 5 6 6 7 7]; and mir(m) is the mirror operator [example: mir(0 1 1 0 0 0 1 1 2 2 3 3 3 2 2 3) = 3 2 2 3 3 3 2 2 1 1 0 0 0 1 1 0].
a(n) = A002262(A163358(n)) = A025581(A163360(n)) = A059906(A163356(n)).

Extensions

Extended by Antti Karttunen, Aug 01 2009

A059253 Hilbert's Hamiltonian walk on N X N projected onto y axis: m'(3).

Original entry on oeis.org

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

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Jan 23 2001

Keywords

Comments

This is the Y-coordinate of the n-th term in the type I Hilbert's Hamiltonian walk A163359 and the X-coordinate of its transpose A163357.

Crossrefs

See also the y-projection, m(3), A059252 as well as A163538, A163540, A163542, A059261, A059285, A163547 and A163528.

Programs

Formula

Initially [m(0) = 0, m'(0) = 0]; recursion: m(2n + 1) = m(2n).m'(2n).f(m'(2n), 2n).c(m(2n), 2n + 1); m'(2n + 1) = m'(2n).f(m(2n), 2n).f(m(2n), 2n).mir(m'(2n)); m(2n) = m(2n - 1).f(m'(2n - 1), 2n - 1).f(m'(2n - 1), 2n - 1).mir(m(2n - 1)); m'(2n) = m'(2n - 1).m(2n - 1).f(m(2n - 1), 2n - 1).c(m'(2n - 1), 2n); where f(m, n) is the alphabetic morphism i := i + 2^n [example: f(0 0 1 1 2 3 3 2 2 3 3 2 1 1 0 0, 2) = 4 4 5 5 6 7 7 6 6 7 7 6 5 5 4 4]; c(m, n) is the complementation to 2^n - 1 alphabetic morphism [example: c(0 0 1 1 2 3 3 2 2 3 3 2 1 1 0 0, 3) = 7 7 6 6 5 4 4 5 5 4 4 5 6 6 7 7]; and mir(m) is the mirror operator [example: mir(0 1 1 0 0 0 1 1 2 2 3 3 3 2 2 3) = 3 2 2 3 3 3 2 2 1 1 0 0 0 1 1 0].
a(n) = A025581(A163358(n)) = A002262(A163360(n)) = A059905(A163356(n)).

Extensions

Extended by Antti Karttunen, Aug 01 2009

A059261 Hilbert's Hamiltonian walk on N X N projected onto the first diagonal: M(3) (sum of the sequences A059252 and A059253).

Original entry on oeis.org

0, 1, 2, 1, 2, 3, 4, 3, 4, 5, 6, 5, 4, 3, 2, 3, 4, 5, 6, 5, 6, 7, 8, 7, 8, 9, 10, 9, 8, 7, 6, 7, 8, 9, 10, 9, 10, 11, 12, 11, 12, 13, 14, 13, 12, 11, 10, 11, 10, 9, 8, 9, 8, 7, 6, 7, 6, 5, 4, 5, 6, 7, 8, 7, 8, 9, 10, 9, 10, 11, 12, 11, 12, 13, 14, 13, 12, 11, 10, 11, 12, 13, 14, 13, 14, 15
Offset: 0

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Jan 24 2001

Keywords

Comments

The interest comes from a simplest recursion than the cross-recursion, dependent on parity, governing the projections onto the x and y axis.

Crossrefs

Cf. the x-projection m(3), A059252 and the y-projection m'(3), A059253. See also: A163530, A059285, A163547.

Formula

Initially, M(0)=0; recursion: M(n+1)=M(n).f(M(n), n).f(M(n), n+1).d(M(n), n); -f(m, n) is the alphabetic morphism i := i+2^n; [example: f(0 1 2 1 2 3 4 3 4 5 6 5 4 3 2 3, 2)=4 5 6 5 6 7 8 7 8 9 10 9 8 7 6 7 ] -d(m, n) is the complementation to 2^(n-1)*3-2, alphabetic morphism; [example: d(0 1 2 1 2 3 4 3 4 5 6 5 4 3 2 3, 3)=10 9 8 9 8 7 6 7 6 5 4 5 6 7 8 7] Here is M(3). [M(1)=0.1.2.1, M(2)=0 1 2 1.2 3 4 3.4 5 6 5.4 3 2 3]

Extensions

Extended by Antti Karttunen, Aug 01 2009

A163530 a(n) = A163528(n)+A163529(n).

Original entry on oeis.org

0, 1, 2, 3, 2, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 4, 5, 6, 7, 8, 9, 8, 7, 8, 9, 10, 11, 10, 9, 10, 11, 12, 13, 12, 11, 10, 9, 8, 7, 8, 9, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 6, 5, 6, 7, 8, 9, 8, 7, 8, 9, 10, 11, 12, 13, 12, 11, 10, 9, 10, 11, 12, 13, 14, 15, 14, 13, 14, 15, 16, 17, 18, 19, 18, 17
Offset: 0

Views

Author

Antti Karttunen, Aug 01 2009

Keywords

Crossrefs

See also: A059261, A059285, A163531.

A341120 a(n) is the X-coordinate of the n-th point of the space filling curve C defined in Comments section; A341121 gives Y-coordinates.

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 2, 2, 3, 4, 4, 3, 3, 3, 4, 5, 5, 5, 4, 4, 5, 6, 6, 6, 7, 8, 8, 7, 7, 7, 8, 8, 7, 6, 6, 5, 5, 5, 6, 5, 5, 5, 6, 6, 7, 8, 8, 9, 9, 9, 8, 8, 9, 10, 10, 10, 11, 12, 12, 11, 11, 11, 12, 12, 13
Offset: 0

Views

Author

Kevin Ryde and Rémy Sigrist, Feb 05 2021

Keywords

Comments

We define the family {C_k, k >= 0}, as follows:
- C_0 corresponds to the points (0, 0), (0, 1), (1, 1), (2, 1) and (2, 0), in that order:
+---+---+
| |
+ +
O
- for any k >= 0, C_{k+1} is obtained by arranging 4 copies of C_k as follows:
+ . . . + . . . +
. B . B .
+ . . . + . . .
. B . .A C.A C.
. . --> + . . . + . . . +
.A C. .C . A.
+ . . . + . B.B .
O .A . C.
+ . . . + . . . +
O
- the space filling curve C is the limit of C_{2*k} as k tends to infinity.
The even bisection of the curve M defined in A341018 is similar to C and vice versa.
The third quadrisection of C is similar to the Hilbert Hamiltonian walk H = A059252, A059253.
H is the number of points in the middle of each unit square in Hilbert's subdivisions, whereas here points are at the starting corner of each unit square. This start is either the bottom left or top right corner depending on how many 180-degree rotations have been applied. These rotations are digit 3's of n written in base 4, hence the formula below adding A283316.

Examples

			Points n and their locations X=a(n), Y=A341121(n) begin as follows. n=7 and n=9 are both at X=3,Y=2, and n=11,n=31 both at X=3,Y=4.
      |       |
    4 | 16---17   12--11,31
      |  |         |    |
    3 | 15---14---13   10
      |                 |
    2 |            8---7,9
      |                 |
    1 |  1----2----3    6
      |  |         |    |
  Y=0 |  0         4----5
      +--------------------
       X=0    1    2    3
		

Crossrefs

Cf. A341121 (Y coordinate), A059285 (projection Y-X), A062880 (n on X=Y diagonal).

Programs

  • PARI
    See Links section.

Formula

a(n) = A341121(n) - A059285(n).
a(n) = A341121(n) iff n belongs to A062880.
a(2*n) = A341018(n).
a(4*n) = 2*A341121(n).
a(16*n) = 4*a(n).
a(n) = A059252(n) + A283316(n+1).
A059253(n) = (a(4*n+2)-1)/2.
Showing 1-5 of 5 results.