|
|
A135603
|
|
Obtuse-angled numbers with an internal digit as the vertex.
|
|
10
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
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.
|
|
LINKS
|
|
|
EXAMPLE
|
Illustration of the number 9753111:
9 . . . . . .
. . . . . . .
. 7 . . . . .
. . . . . . .
. . 5 . . . .
. . . . . . .
. . . 3 . . .
. . . . . . .
. . . . 1 1 1
. . . . . . .
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|