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.
For each k >= 11, there are 354 k-digit terms. - Michael S. Branicky, Aug 03 2022
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10232
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
print(list(islice(agen(), 54))) # Michael S. Branicky, Aug 03 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Omar E. Pol, Dec 02 2007
EXTENSIONS
a(49) and beyond from Michael S. Branicky, Aug 03 2022
STATUS
approved