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-10 of 21 results. Next

A163360 Inverse permutation to A163359.

Original entry on oeis.org

0, 2, 4, 1, 3, 6, 11, 7, 12, 17, 24, 18, 13, 8, 5, 9, 14, 19, 26, 20, 27, 35, 43, 34, 42, 52, 62, 51, 41, 33, 25, 32, 40, 49, 60, 50, 61, 73, 85, 72, 84, 98, 112, 97, 83, 71, 59, 70, 58, 47, 38, 48, 39, 31, 23, 30, 22, 16, 10, 15, 21, 29, 37, 28, 36, 45, 56, 46, 57, 69, 81
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Comments

abs(A025581(a(n+1)) - A025581(a(n))) + abs(A002262(a(n+1)) - A002262(a(n))) = 1 for all n.

Crossrefs

Inverse: A163359. a(n) = A061579(A163358(n)). One-based version: A163364.

A163541 The absolute direction (0=east, 1=south, 2=west, 3=north) taken by the type I Hilbert's Hamiltonian walk A163359 at the step n.

Original entry on oeis.org

1, 0, 3, 0, 0, 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, 0, 0, 1, 0, 3, 0, 0, 1, 2, 1, 1, 0, 3, 0, 1, 0, 3, 3, 2, 3, 0, 0, 1, 0, 3, 0, 0, 1, 2, 1, 0, 1, 2, 2, 3, 2, 1, 1, 1, 0, 3, 0, 0, 1
Offset: 1

Views

Author

Antti Karttunen, Aug 01 2009

Keywords

Comments

Taking every sixteenth term gives the same sequence: (and similarly for all higher powers of 16 as well): a(n) = a(16*n).

Crossrefs

a(n) = A163541(A008598(n)) = A004442(A163540(n)). See also A163543.

Programs

  • Mathematica
    HC = {L[n_ /; IntegerQ[n/2]] :> {F[n], L[n], L[n + 1], R[n + 2]},
    R[n_ /; IntegerQ[(n + 1)/2]] :> {F[n], R[n], R[n + 3], L[n + 2]},
    R[n_ /; IntegerQ[n/2]] :> {L[n], R[n + 1], R[n], F[n + 3]},
    L[n_ /; IntegerQ[(n + 1)/2]] :> {R[n], L[n + 3], L[n], F[n + 1]},
    F[n_ /; IntegerQ[n/2]] :> {L[n], R[n + 1], R[n], L[n + 3]},
    F[n_ /; IntegerQ[(n + 1)/2]] :> {R[n], L[n + 3], L[n], R[n + 1]}};
    a[1] = L[0]; Map[(a[n_ /; IntegerQ[(n - #)/16]] := Part[Flatten[a[(n + 16 - #)/16]/.HC/.HC],#]) &, Range[16]];
    Part[FoldList[Mod[Plus[#1, #2], 4] &, 0, a[#] & /@ Range[4^4]/.{F[n_]:>0,L[n_]:>1,R[n_]:>-1}], 2 ;; -1] (* Bradley Klee, Aug 07 2015 *)
  • Scheme
    (define (A163541 n) (modulo (+ 3 (A163538 n) (A163539 n) (abs (A163538 n))) 4))

Formula

a(n) = A010873(A163538(n) + A163539(n) + abs(A163538(n)) + 3).

A163543 The relative direction (0=straight ahead, 1=turn right, 2=turn left) taken by the type I Hilbert's Hamiltonian walk A163359 at the step n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 01 2009

Keywords

Comments

a(16*n) = a(256*n) for all n.

Crossrefs

a(n) = A014681(A163542(n)). See also A163541.

Programs

  • Mathematica
    HC = {
    L[n_ /; IntegerQ[n/2]] :> {F[n], L[n], L[n + 1], R[n + 2]},
    R[n_ /; IntegerQ[(n + 1)/2]] :> {F[n], R[n], R[n + 3], L[n + 2]},
    R[n_ /; IntegerQ[n/2]] :> {L[n], R[n + 1], R[n], F[n + 3]},
    L[n_ /; IntegerQ[(n + 1)/2]] :> {R[n], L[n + 3], L[n], F[n + 1]},
    F[n_ /; IntegerQ[n/2]] :> {L[n], R[n + 1], R[n], L[n + 3]},
    F[n_ /; IntegerQ[(n + 1)/2]] :> {R[n], L[n + 3], L[n], R[n + 1]}};
    a[1] = F[0]; Map[(a[n_ /; IntegerQ[(n - #)/16] ] := Part[Flatten[a[(n + 16 - #)/16] /. HC /. HC],#]) &, Range[16]];
    Part[a[#] & /@ Range[4^4] /. {L[] -> 2, R[] -> 1, F[] -> 0}, 2 ;; -1] (* _Bradley Klee, Aug 06 2015 *)
  • Scheme
    (define (A163543 n) (A163241 (modulo (- (A163541 (1+ n)) (A163541 n)) 4)))

Formula

a(n) = A163241((A163541(n+1)-A163541(n)) modulo 4).

A165466 Squared distance between n's location in A163334 array and A163359 array.

Original entry on oeis.org

0, 2, 2, 2, 2, 10, 10, 2, 0, 0, 2, 10, 20, 10, 10, 18, 32, 32, 50, 74, 100, 100, 72, 50, 32, 50, 50, 34, 20, 20, 16, 16, 16, 10, 4, 4, 2, 4, 8, 8, 8, 10, 20, 18, 20, 20, 26, 50, 50, 40, 20, 20, 20, 20, 32, 32, 34, 40, 58, 74, 100, 74, 74, 80, 80, 80, 52, 52, 50, 34, 34, 32
Offset: 0

Views

Author

Antti Karttunen, Oct 06 2009

Keywords

Comments

Equivalently, squared distance between n's location in A163336 array and A163357 array. See example at A166043.

Crossrefs

Positions of zeros: A165467. See also A166043, A165464, A163897, A163900.

Formula

a(n) = A000290(abs(A163529(n)-A059253(n))) + A000290(abs(A163528(n)-A059252(n))).

A163365 Row sums of A163357 and A163359.

Original entry on oeis.org

0, 4, 20, 40, 100, 172, 248, 336, 568, 820, 1100, 1400, 1692, 2012, 2352, 2720, 3632, 4580, 5572, 6600, 7700, 8844, 10024, 11248, 12392, 13588, 14844, 16152, 17484, 18876, 20320, 21824, 25440, 29124, 32884, 36712, 40644, 44652, 48728, 52880
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Comments

All terms seem to be divisible by 4. Cf. A163477.

Crossrefs

Programs

  • Mathematica
    nn = 7; s[{n_, k_}, {m_}] := (a[k, n] = m - 1); MapIndexed[s, List @@ HilbertCurve[nn][[1]]]; Total /@ Table[a[n - k, k], {n, 0, nn^2}, {k, n, 0, -1}] (* Michael De Vlieger, Nov 01 2022, after Jean-François Alcover at A163357 *)

A163482 Row 0 of A163357 (column 0 of A163359).

Original entry on oeis.org

0, 1, 14, 15, 16, 19, 20, 21, 234, 235, 236, 239, 240, 241, 254, 255, 256, 259, 260, 261, 314, 315, 316, 319, 320, 321, 334, 335, 336, 339, 340, 341, 3754, 3755, 3756, 3759, 3760, 3761, 3774, 3775, 3776, 3779, 3780, 3781, 3834, 3835, 3836, 3839
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Crossrefs

Cf. A163483.

A163483 Row 0 of A163359 (column 0 of A163357).

Original entry on oeis.org

0, 3, 4, 5, 58, 59, 60, 63, 64, 65, 78, 79, 80, 83, 84, 85, 938, 939, 940, 943, 944, 945, 958, 959, 960, 963, 964, 965, 1018, 1019, 1020, 1023, 1024, 1025, 1038, 1039, 1040, 1043, 1044, 1045, 1258, 1259, 1260, 1263, 1264, 1265, 1278, 1279, 1280, 1283
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Crossrefs

Cf. A163482.

A163477 Row sums of A163357 and A163359 divided by 4.

Original entry on oeis.org

0, 1, 5, 10, 25, 43, 62, 84, 142, 205, 275, 350, 423, 503, 588, 680, 908, 1145, 1393, 1650, 1925, 2211, 2506, 2812, 3098, 3397, 3711, 4038, 4371, 4719, 5080, 5456, 6360, 7281, 8221, 9178, 10161, 11163, 12182, 13220, 14310, 15421, 16555, 17710
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 8; s[{n_, k_}, {m_}] := (a[k, n] = m - 1); MapIndexed[s, List @@ HilbertCurve[nn][[1]]]; Floor[1/4*Map[Total, Table[a[n - k, k], {n, 0, nn^2}, {k, n, 0, -1}]]] (* Michael De Vlieger, Nov 01 2022, after Jean-François Alcover at A163357 *)

Formula

a(n) = floor(A163365(n)/4) (floor probably unnecessary).

A163357 Hilbert curve in N X N grid, starting rightwards from the top-left corner, listed by descending antidiagonals.

Original entry on oeis.org

0, 1, 3, 14, 2, 4, 15, 13, 7, 5, 16, 12, 8, 6, 58, 19, 17, 11, 9, 57, 59, 20, 18, 30, 10, 54, 56, 60, 21, 23, 29, 31, 53, 55, 61, 63, 234, 22, 24, 28, 32, 52, 50, 62, 64, 235, 233, 25, 27, 35, 33, 51, 49, 67, 65, 236, 232, 230, 26, 36, 34, 46, 48, 68, 66, 78, 239, 237, 231
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Examples

			The top left 8 X 8 corner of the array shows how this surjective self-avoiding walk begins (connect the terms in numerical order, 0-1-2-3-...):
   0  1 14 15 16 19 20 21
   3  2 13 12 17 18 23 22
   4  7  8 11 30 29 24 25
   5  6  9 10 31 28 27 26
  58 57 54 53 32 35 36 37
  59 56 55 52 33 34 39 38
  60 61 50 51 46 45 40 41
  63 62 49 48 47 44 43 42
		

Crossrefs

Transpose: A163359. Inverse: A163358. One-based version: A163361. Row sums: A163365. Row 0: A163482. Column 0: A163483. Central diagonal: A062880. See also A163334 & A163336 for the Peano curve.

Programs

  • Mathematica
    b[{n_, k_}, {m_}] := (A[k, n] = m-1);
    MapIndexed[b, List @@ HilbertCurve[4][[1]]];
    Table[A[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Mar 07 2021 *)

Formula

a(n) = A163355(A054238(n)).

Extensions

Links to further derived sequences added by Antti Karttunen, Sep 21 2009

A163334 Peano curve in an n X n grid, starting rightwards from the top left corner, listed antidiagonally as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), ... .

Original entry on oeis.org

0, 1, 5, 2, 4, 6, 15, 3, 7, 47, 16, 14, 8, 46, 48, 17, 13, 9, 45, 49, 53, 18, 12, 10, 44, 50, 52, 54, 19, 23, 11, 43, 39, 51, 55, 59, 20, 22, 24, 42, 40, 38, 56, 58, 60, 141, 21, 25, 29, 41, 37, 69, 57, 61, 425, 142, 140, 26, 28, 30, 36, 70, 68, 62, 424, 426, 143, 139
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Examples

			The top left 9 X 9 corner of the array shows how this surjective self-avoiding walk begins (connect the terms in numerical order, 0-1-2-3-...):
   0  1  2 15 16 17 18 19 20
   5  4  3 14 13 12 23 22 21
   6  7  8  9 10 11 24 25 26
  47 46 45 44 43 42 29 28 27
  48 49 50 39 40 41 30 31 32
  53 52 51 38 37 36 35 34 33
  54 55 56 69 70 71 72 73 74
  59 58 57 68 67 66 77 76 75
  60 61 62 63 64 65 78 79 80
		

Crossrefs

Transpose: A163336. Inverse: A163335. One-based version: A163338. Row sums: A163342. Row 0: A163480. Column 0: A163481. Central diagonal: A163343.
See A163357 and A163359 for the Hilbert curve.

Programs

  • Mathematica
    b[{n_, k_}, {m_}] := (A[k, n] = m - 1);
    MapIndexed[b, List @@ PeanoCurve[4][[1]]];
    Table[A[n - k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Mar 07 2021 *)

Formula

a(n) = A163332(A163328(n)).

Extensions

Links to further derived sequences added by Antti Karttunen, Sep 21 2009
Name corrected by Kevin Ryde, Aug 22 2020
Showing 1-10 of 21 results. Next