A135600 Angled numbers with an internal digit as the vertex.
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147
Offset: 1
Examples
The acute-angled number 12342 (see A135601): . . . . . . . . 4 . . . 3 . . . 2 . . 2 1 . . . . The right-angled number 12343 (see A135602): . . . . . . . . 4 . . . 3 . 3 . 2 . . . 1 . . . . The obtuse-angled number 12344 (see A135603): . . . . . . . . 4 4 . . 3 . . . 2 . . . 1 . . . . The straight-angled (or straight-line) number 12345 (see A135643): . . . . 5 . . . 4 . . . 3 . . . 2 . . . 1 . . . .
Links
- David A. Corneth, Table of n, a(n) for n = 1..10910
- David A. Corneth, PARI program
Crossrefs
Programs
-
PARI
\\ See PARI link. David A. Corneth, Aug 02 2022
-
Python
from itertools import count, islice def agen(): seeds = [k for k in range(100, 1000)] 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(), 50))) # Michael S. Branicky, Aug 03 2022
Comments