A301516 Numbers n with decimal expansion (d_1, ..., d_k) such that the convex hull of the set of points { (i, d_i), i = 1..k } has positive area.
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 149, 150, 151, 152, 153, 154, 155
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
PARI
is(n, base=10) = my (d=digits(n, base)); for (i=1, #d-2, if (d[i]+d[i+2]-2*d[i+1], return (1))); return (0)
-
Python
def ok(n): d = list(map(int, str(n))) return any(d[i]+d[i+2]-2*d[i+1] != 0 for i in range(len(d)-2)) print([k for k in range(1002) if ok(k)]) # Michael S. Branicky, Aug 03 2022 after Rémy Sigrist
Comments