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.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Dec 16 2018

Keywords

Comments

This sequence is the complement of the straight-line numbers (0..99 alongside A135643).
This sequence first differs from A134999 at n = 857: a(857) = 1001 whereas A134999(857) = 1011.

Crossrefs

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

A322629 For a nonnegative number m with decimal digits (d_1, ..., d_k), let s(m) be the area of the convex hull of the set of points { (i, d_i), i = 1..k }; a(n) = 2 * s(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 15, 14, 13
Offset: 100

Views

Author

Rémy Sigrist, Dec 21 2018

Keywords

Comments

The data section starts at offset 100, however the sequence is well-defined for smaller values of n: a(n) = 0 for n = 0...99.

Examples

			For n = 1212:
- the corresponding convex hull is as follows:
      (2,2) +-----+ (4,2)
           /     /
          /     /
   (1,1) +-----+ (3,1)
- it has area 2, hence a(1212) = 4.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

A302907(n) = a(prime(n)) where n denotes the n-th prime number.
a(10^n) = n-1 for any n > 0.
a(n) > 0 iff n belongs to A301516.
Showing 1-2 of 2 results.