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

A334475 a(n) is the X-coordinate of the n-th point of the space filling curve T defined in A334474; sequence A334476 gives Y-coordinates.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, May 02 2020

Keywords

Examples

			The space filling curve T starts as follows:
    5|  ...
     |   |
     |   |
    4|  16
     |   \
     |    \
    3|   5 15-14-13
     |   |\       |
     |   | \      |
    2|   4  6 11-12
     |    \  \  \
     |     \  \  \
    1|   1  3  7 10
     |   |\ |  |  |
     |   | \|  |  |
    0|   0  2  8--9
  ---+-------------
  y/x|   0  1  2  3
- hence a(2) = a(3) = a(6) = a(15) = 1.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

A334474(A334476(n), a(n)) = n.

A334476 a(n) is the Y-coordinate of the n-th point of the space filling curve T defined in A334474; sequence A334475 gives X-coordinates.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, May 02 2020

Keywords

Examples

			The space filling curve T starts as follows:
    5|  ...
     |   |
     |   |
    4|  16
     |   \
     |    \
    3|   5 15-14-13
     |   |\       |
     |   | \      |
    2|   4  6 11-12
     |    \  \  \
     |     \  \  \
    1|   1  3  7 10
     |   |\ |  |  |
     |   | \|  |  |
    0|   0  2  8--9
  ---+-------------
  y/x|   0  1  2  3
- hence a(1) = a(3) = a(7) = a(10) = 1.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

A334474(a(n), A334475(n)) = n.

A342224 The n-th and a(n)-th points of the curve (A334474, A334475) are symmetrical with respect to the line X=Y.

Original entry on oeis.org

0, 2, 1, 3, 8, 9, 7, 6, 4, 5, 15, 11, 14, 13, 12, 10, 31, 32, 30, 29, 33, 35, 34, 28, 27, 26, 25, 24, 23, 19, 18, 16, 17, 20, 22, 21, 63, 62, 59, 58, 60, 61, 42, 44, 43, 47, 46, 45, 57, 55, 56, 51, 54, 53, 52, 49, 50, 48, 39, 38, 40, 41, 37, 36, 121, 122, 120
Offset: 0

Views

Author

Rémy Sigrist, Mar 06 2021

Keywords

Comments

In other words, a(n) is the unique k such that A334474(n) = A334475(k) and A334474(k) = A334475(n).
This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			The curve (A334474, A334475) begins as follows on a hexagonal lattice:
                 +
                /5\
               /   \
              +4    +6
               \     \
                \     \
           +    3+     +7
          /1\   /     /
         /   \ /     /
        +     +     +----+
         0     2     8    9
- so a(0) = 0,
     a(1) = 2,
     a(3) = 3,
     a(4) = 8,
     a(5) = 9,
     a(6) = 7.
		

Crossrefs

See A342217 and A342218 for similar sequences.

Programs

  • PARI
    See Links section.

Formula

a(n) < A007582(k) for any n < A007582(k).

A344634 Numbers k such that half the numbers from 0 to k inclusive contain the digit "0".

Original entry on oeis.org

1, 10761677, 14958585, 14960717, 14961735, 15013205, 15588833, 15590573, 15591959, 15591961, 15592031, 15592229, 15592231, 15603695, 15633495, 15633503, 15633517, 16076087, 16263743, 20327615
Offset: 1

Views

Author

Glen Gilchrist, May 25 2021

Keywords

Comments

Andrew Hilton (see Ref.) refers to these as "half-zero" numbers.

Examples

			1 is a term since among the numbers 0,1 exactly half contain a digit "0".
10761677 is a term since among the numbers 0,1,2,...,10761677 exactly half contain a digit "0".
		

References

  • Andrew Hilton, 101 Puzzles to Solve on your Microcomputer, 1984, HARRAP, page 57.

Crossrefs

Programs

  • Python
    def afind(limit):
      count0 = [0, 1]
      for k in range(1, limit+1):
        count0['0' in str(k)] += 1
        if count0[0] == count0[1]: print(k, end=", ")
    afind(3*10**7) # Michael S. Branicky, May 25 2021
Showing 1-4 of 4 results.