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

A334493 a(n) is the "w" part of f(n) = Sum_{k>=0, d_k>0} (1+w)^(d_k-1) * (3+w)^k where Sum_{k>=0} d_k * 7^k is the base 7 representation of n and w = -1/2 + sqrt(-3)/2 is a primitive cube root of unity; sequence A334492 gives "real" parts.

Original entry on oeis.org

0, 0, 1, 1, 0, -1, -1, 1, 1, 2, 2, 1, 0, 0, 3, 3, 4, 4, 3, 2, 2, 2, 2, 3, 3, 2, 1, 1, -1, -1, 0, 0, -1, -2, -2, -3, -3, -2, -2, -3, -4, -4, -2, -2, -1, -1, -2, -3, -3, 5, 5, 6, 6, 5, 4, 4, 6, 6, 7, 7, 6, 5, 5, 8, 8, 9, 9, 8, 7, 7, 7, 7, 8, 8, 7, 6, 6, 4, 4, 5
Offset: 0

Views

Author

Rémy Sigrist, May 03 2020

Keywords

Comments

For any Eisenstein integer z = u + v*w (where u and v are integers), we call u the "real" part of z and v the "w" part of z.
This sequence has connections with A316658; here we work with Eisenstein integers, there with Gaussian integers.
It appears that f defines a bijection from the nonnegative integers to the Eisenstein integers.

Examples

			The following diagram depicts f(n) for n = 0..13:
            "w" axis
                \
           .     .     .     .     .     .     .     .
                  \              10     9
                   \
        .     .     .     .     .     .     .     .
                   3 \   2    11     7     8
                      \
           ._____._____._____._____._____._____._____. "real" axis
                4     0 \   1    12    13
                         \
        .     .     .     .     .     .     .     .
                   5     6 \
- f(9) = 4 + 2*w, hence a(9) = 2.
		

Crossrefs

Cf. A307012 (equivalent coordinate for a counterclockwise spiral), A316658, A334492.

Programs

  • PARI
    See Links section.

A307013 Third coordinate (asymmetric variant) in a redundant hexagonal coordinate system of the points of a counterclockwise spiral on an hexagonal grid. First and second coordinates are given in A307011 and A307012.

Original entry on oeis.org

0, 1, 1, 0, -1, -1, 0, 1, 2, 2, 2, 1, 0, -1, -2, -2, -2, -1, 0, 1, 2, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 4, 4, 4, 4, 4, 3, 2, 1, 0, -1, -2, -3, -4, -4, -4, -4, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0, -1, -2
Offset: 0

Views

Author

Hugo Pfoertner, Mar 19 2019

Keywords

Comments

From Peter Munn, Jul 11 2021: (Start)
The points of the spiral are equally the points of a hexagonal lattice, the points of an isometric (triangular) grid and the center points of the cells of a honeycomb (regular hexagonal tiling or grid). The coordinate system can be described using three "0-axes" that pass through spiral point 0 and one of points 1, 2 or 3. These 0-axes are the lines along which one of the coordinates is 0.
a(n), the 3rd coordinate, is the signed distance from spiral point n to the coordinate's 0-axis, which passes through points 0 and 3. The distance is measured along either of the lines through point n that are parallel to one of the other 2 axes and the sign is such that point 1 has positive distance. This 3rd coordinate is the sum of the other 2. In the symmetric variant of the coordinate system, the 3rd coordinate has the opposite sense, so that the 3 coordinates sum to 0. See A345978.
We can use any 2 of the 3 coordinates to form an oblique coordinate system, in which each of the 2 coordinates specifies vectors parallel to the other coordinate's 0-axis. This means the direction of the oblique coordinate vectors depends on the choice of the other coordinate - see the illustration of coordinate pairing in the links. When both coordinates are positive, an oblique coordinate vector derived from this sequence makes a 120-degree angle with the vector derived from the other sequence; however, when A307011 and A307012 are used together, the angle is 60 degrees.
Pairing with A307012 can be viewed as follows. Let omega = -1/2 + i*sqrt(3)/2, a primitive cube root of unity. Then f(n) = a(n) + omega*A307012(n) embeds the spiral in the complex plane with spiral points 0 and 1 embedded at 0 and 1 (so that the points of the spiral embed as the Eisenstein integers, as used for A345435).
(End)

Crossrefs

A334492 is effectively this "3rd coordinate" for a different sequence of points on a hexagonal lattice.

Formula

a(n) = A307011(n) + A307012(n). - Peter Munn, Jul 04 2021

A348916 a(n) is the "real" part of f(n) = Sum_{k >= 0} g(d_k) * (4 + w)^k where g(0) = 0 and g(1 + u + 2*v) = (2 + w)^u * (1 + w)^v for any u = 0..1 and v = 0..5, Sum_{k >= 0} d_k * 13^k is the base-13 representation of n and w = -1/2 + sqrt(-3)/2 is a primitive cube root of unity; sequence A348917 gives "w" parts.

Original entry on oeis.org

0, 1, 2, 1, 1, 0, -1, -1, -2, -1, -1, 0, 1, 4, 5, 6, 5, 5, 4, 3, 3, 2, 3, 3, 4, 5, 7, 8, 9, 8, 8, 7, 6, 6, 5, 6, 6, 7, 8, 3, 4, 5, 4, 4, 3, 2, 2, 1, 2, 2, 3, 4, 2, 3, 4, 3, 3, 2, 1, 1, 0, 1, 1, 2, 3, -1, 0, 1, 0, 0, -1, -2, -2, -3, -2, -2, -1, 0, -5, -4, -3
Offset: 0

Views

Author

Rémy Sigrist, Nov 03 2021

Keywords

Comments

For any Eisenstein integer z = u + v*w (where u and v are integers), we call u the "real" part of z and v the "w" part of z.
This sequence combines features of A334492 and of A348652.
It appears that f defines a bijection from the nonnegative integers to the Eisenstein integers.
The following diagram depicts g(d) for d = 0..12:
"w" axis
\
. .
\ 4
\
. . . .
6 5 \ 3 2
\
.___._____.___._____._ "real" axis
7 0 \ 1
\
. . . .
8 9 11 \ 12
\
. .
10 \

Crossrefs

Programs

  • PARI
    See Links section.

A348355 The base-7 expansion of a(n) is obtained by replacing 1's, 2's, 3's, 4's, 5's and 6's by 4's, 5's, 6's, 1's, 2's and 3's, respectively, in the base-7 expansion of n.

Original entry on oeis.org

0, 4, 5, 6, 1, 2, 3, 28, 32, 33, 34, 29, 30, 31, 35, 39, 40, 41, 36, 37, 38, 42, 46, 47, 48, 43, 44, 45, 7, 11, 12, 13, 8, 9, 10, 14, 18, 19, 20, 15, 16, 17, 21, 25, 26, 27, 22, 23, 24, 196, 200, 201, 202, 197, 198, 199, 224, 228, 229, 230, 225, 226, 227, 231
Offset: 0

Views

Author

Rémy Sigrist, Oct 14 2021

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
It is possible to build a similar sequence for any fixed base b > 1 and any permutation p of {1, ..., b-1}.
This sequence is interesting as it satisfies f(a(n)) = -f(n), where f(n) = (A334492(n), A334493(n)).

Examples

			The first terms, in decimal and in base 7, are:
  n   a(n)  s(n)  s(a(n))
  --  ----  ----  -------
   0     0     0        0
   1     4     1        4
   2     5     2        5
   3     6     3        6
   4     1     4        1
   5     2     5        2
   6     3     6        3
   7    28    10       40
   8    32    11       44
   9    33    12       45
  10    34    13       46
		

Crossrefs

See A004488, A048647 and A348354 for similar sequences.

Programs

  • Mathematica
    a[n_] := With[{d = {0, 4, 5, 6, 1, 2, 3}}, FromDigits[d[[IntegerDigits[n, 7] + 1]], 7]]; Array[a, 64, 0] (* Amiram Eldar, Oct 16 2021 *)
  • PARI
    a(n, p=[4,5,6,1,2,3]) = fromdigits(apply(d -> if (d, p[d], 0), digits(n, #p+1)), #p+1)

A348910 a(n) is the "real" part of f(n) = Sum_{k>=0, d_k>0} w^(d_k-1) * (-2)^k where Sum_{k>=0} d_k * 4^k is the base-4 representation of n and w = -1/2 + sqrt(-3)/2 is a primitive cube root of unity; sequence A348911 gives "w" parts.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Nov 03 2021

Keywords

Comments

For any Eisenstein integer z = u + v*w (where u and v are integers), we call u the "real" part of z and v the "w" part of z.
The function f defines a bijection from the nonnegative integers to the Eisenstein integers.

Crossrefs

See A334492 for a similar sequence.

Programs

  • PARI
    See Links section.

Formula

a(2^k) = A077966(k) for any k >= 0.

A348920 a(n) is the "real" part of f(n) = Sum_{k >= 0} g(d_k) * (4 + w)^k where g(0) = 0 and g(1 + u + 2*v) = (1 + u) * (1 + w)^v for any u = 0..1 and v = 0..5, Sum_{k >= 0} d_k * 13^k is the base-13 representation of n and w = -1/2 + sqrt(-3)/2 is a primitive cube root of unity; sequence A348921 gives "w" parts.

Original entry on oeis.org

0, 1, 2, 1, 2, 0, 0, -1, -2, -1, -2, 0, 0, 4, 5, 6, 5, 6, 4, 4, 3, 2, 3, 2, 4, 4, 8, 9, 10, 9, 10, 8, 8, 7, 6, 7, 6, 8, 8, 3, 4, 5, 4, 5, 3, 3, 2, 1, 2, 1, 3, 3, 6, 7, 8, 7, 8, 6, 6, 5, 4, 5, 4, 6, 6, -1, 0, 1, 0, 1, -1, -1, -2, -3, -2, -3, -1, -1, -2, -1, 0
Offset: 0

Views

Author

Rémy Sigrist, Nov 04 2021

Keywords

Comments

For any Eisenstein integer z = u + v*w (where u and v are integers), we call u the "real" part of z and v the "w" part of z.
This sequence is a variant of A334492 and of A348916.
It appears that f defines a bijection from the nonnegative integers to the Eisenstein integers.
The following diagram depicts g(d) for d = 0..12:
"w" axis
\
. . .
6 \ 4
\
. .
5 \ 3
\
.___._____.___._____._ "real" axis
8 7 0 \ 1 2
\
. .
9 11 \
\
. . .
10 12 \

Crossrefs

Programs

  • PARI
    See Links section.
Showing 1-6 of 6 results.