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.

A135603 Obtuse-angled numbers with an internal digit as the vertex.

Original entry on oeis.org

100, 110, 112, 113, 114, 115, 116, 117, 118, 119, 122, 124, 125, 126, 127, 128, 129, 133, 134, 136, 137, 138, 139, 144, 145, 146, 148, 149, 155, 156, 157, 158, 166, 167, 168, 169, 177, 178, 179, 188, 189, 199, 200, 211, 220, 221, 223, 224, 225, 226, 227, 228, 229, 233
Offset: 1

Views

Author

Omar E. Pol, Dec 02 2007

Keywords

Comments

The structure of digits represents an obtuse angle. The vertex is an internal digit. In the graphic representation the points are connected by imaginary line segments from left to right.
For each k >= 11, there are 354 k-digit terms. - Michael S. Branicky, Aug 03 2022

Examples

			Illustration of the number 9753111:
  9 . . . . . .
  . . . . . . .
  . 7 . . . . .
  . . . . . . .
  . . 5 . . . .
  . . . . . . .
  . . . 3 . . .
  . . . . . . .
  . . . . 1 1 1
  . . . . . . .
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def ok3(n):
        if n < 100: return False
        d = list(map(int, str(n)))
        m1, m2 = (d[1]-d[0], d[-1]-d[-2])
        return len({m1, m2}) == 2 and m1*m2 >= 0
    def agen():
        seeds = [k for k in range(100, 1000) if ok3(k)]
        for digits in count(4):
            yield from sorted(seeds)
            new, pow10 = set(), 10**(digits-1)
            for q in seeds:
                d = list(map(int, str(q)))
                e1, e2 = d[0] - (d[1]-d[0]), d[-1] + (d[-1]-d[-2])
                if 9 >= e1 > 0: new.add(e1*pow10 + q)
                if 9 >= e2 >= 0: new.add(10*q + e2)
            seeds = new
    print(list(islice(agen(), 54))) # Michael S. Branicky, Aug 03 2022

Extensions

a(49) and beyond from Michael S. Branicky, Aug 03 2022