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-8 of 8 results.

A135643 Straight-line numbers > 99.

Original entry on oeis.org

111, 123, 135, 147, 159, 210, 222, 234, 246, 258, 321, 333, 345, 357, 369, 420, 432, 444, 456, 468, 531, 543, 555, 567, 579, 630, 642, 654, 666, 678, 741, 753, 765, 777, 789, 840, 852, 864, 876, 888, 951, 963, 975, 987, 999, 1111, 1234
Offset: 1

Views

Author

Omar E. Pol, Nov 30 2007, Dec 09 2008, Nov 14 2009

Keywords

Comments

Numbers with more than two digits whose digits are in arithmetic progression. The structure of digits represents a straight line. In the graphic representation the points are connected by imaginary line segments. For a(1) to a(45) this sequence is equal to A034840. Each term of this sequence that is greater than 9876543210 is a repdigit number (A010785).
Note that the sequence of straight-line numbers starts: 10, 11, 12, ..., 98, 99, 111, 123, ... All 2-digit numbers are straight-line numbers, but here the numbers < 100 are omitted. - Omar E. Pol, Nov 14 2009

Examples

			The number 3579 is a straight-line number:
  . . . 9
  . . . .
  . . 7 .
  . . . .
  . 5 . .
  . . . .
  3 . . .
  . . . .
  . . . .
  . . . .
		

Crossrefs

Cf. A247616 (subsequence).

Programs

  • Haskell
    a135643 n = a135643_list !! (n-1)
    a135643_list = filter f [100..] where
       f x = all (== 0) ws where
             ws = zipWith (-) (tail vs) vs
             vs = zipWith (-) (tail us) us
             us = map (read . return) $ show x
    -- Reinhard Zumkeller, Sep 21 2014
    
  • Mathematica
    Select[Range[100,1300],Length[Union[Differences[IntegerDigits[#]]]]==1&] (* Harvey P. Dale, May 09 2012 *)
  • PARI
    is(n) = my (d=digits(n), cvx=0, ccv=0, str=0); for (i=1, #d-2, my (x=d[i]+d[i+2]-2*d[i+1]); if (x>0, cvx++, x<0, ccv++, str++)); return (cvx==0 && ccv==0 && str>0) \\ Rémy Sigrist, Aug 09 2017
    
  • Python
    from itertools import count, islice
    def agen():
        progressions = ["".join(map(str, range(i, j+1, d))) for i in range(10) for d in range(1, 10-i) for j in range(i+2*d, 10)]
        s =  [p for p in progressions if p[0] != "0"]          # up
        s += [p[::-1] for p in progressions]                   # down
        s += [d*i for d in "123456789" for i in range(3, 11)]  # flat
        yield from sorted(set(int(w) for w in s))
        yield from (int(f*d) for d in count(11) for f in "123456789")
    print(list(islice(agen(), 178))) # Michael S. Branicky, Aug 03 2022

A135642 Concave numbers.

Original entry on oeis.org

110, 120, 121, 122, 130, 131, 132, 133, 134, 140, 141, 142, 143, 144, 145, 146, 150, 151, 152, 153, 154, 155, 156, 157, 158, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182
Offset: 1

Views

Author

Omar E. Pol, Nov 30 2007

Keywords

Comments

The structure of digits represents a concave function or a concave object. In the graphic representation the points are connected by imaginary line segments from left to right.
Only strictly concave numbers are included in this sequence; the interpolation between at least one pair of digits must be strictly less than some intermediate digit. - Franklin T. Adams-Watters, Jan 26 2014
Also numbers where the second difference of consecutive digits is at most 0 and at least one of the second differences is negative. - David A. Corneth, Aug 02 2022

Examples

			The number 12221 is a concave number. Note that the number of this sequence (A135642) is also a concave number as shown below:
.
9     . . . . . .      . . . . . .
8     . . . . . .      . . . . . .
7     . . . . . .      . . . . . .
6     . . . x . .      . . . 6 . .
5     . . x . . .      . . 5 . . .
4     . . . . x .      . . . . 4 .
3     . x . . . .      . 3 . . . .
2     . . . . . x      . . . . . 2
1     x . . . . .      1 . . . . .
0     . . . . . .      . . . . . .
.
Another example is 1342. On the other hand, 3124 is not in the sequence, it's in A135641. 1234 is not in the sequence, it's in A135643. 1243 is not in the sequence, it's in A163278. - _Omar E. Pol_, Jan 29 2014
		

Crossrefs

Programs

  • Mathematica
    concaveQ[n_] := With[{dd = IntegerDigits[n]}, AllTrue[SequencePosition[dd, {, , _}][[All, 1]], dd[[#]] + dd[[#+2]] < 2 dd[[#+1]]&]];
    Select[Range[100, 200], concaveQ] (* Jean-François Alcover, Nov 01 2018 *)
  • PARI
    { isconcave(n) = my(t,r); t=eval(Vec(Str(n))); r=0; for(i=1, #t, for(j=i+2, #t, for(k=i+1, j-1, if( t[k]*(j-i) < t[i]*(j-k) + t[j]*(k-i), return(0)); if( t[k]*(j-i) > t[i]*(j-k) + t[j]*(k-i), r=1); ))); r } /* Franklin T. Adams-Watters and Max Alekseyev, Jan 30 2014 */
    
  • PARI
    is(n) = if(n<100, return(0)); my(d=digits(n), v=vector(#d-2, i, d[i+2] - 2*d[i+1] + d[i])); v=Set(v); v[1] < 0 && v[#v] <= 0 \\ David A. Corneth, Aug 02 2022

A135602 Right-angled numbers with an internal digit as the vertex.

Original entry on oeis.org

101, 121, 212, 232, 323, 343, 434, 454, 545, 565, 656, 676, 767, 787, 878, 898, 989, 1012, 1210, 1232, 2101, 2123, 2321, 2343, 3212, 3234, 3432, 3454, 4323, 4345, 4543, 4565, 5434, 5456, 5654, 5676, 6545, 6567, 6765, 6787, 7656, 7678, 7876, 7898, 8767, 8789, 8987
Offset: 1

Views

Author

Omar E. Pol, Dec 02 2007

Keywords

Comments

The structure of digits represents a right angle. The vertex is an internal digit. In the graphic representation the points are connected by imaginary line segments from left to right. This sequence is finite. The final term has 19 digits: 9876543210123456789.

Examples

			Illustration using the final term of this sequence:
  9 . . . . . . . . . . . . . . . . . 9
  . 8 . . . . . . . . . . . . . . . 8 .
  . . 7 . . . . . . . . . . . . . 7 . .
  . . . 6 . . . . . . . . . . . 6 . . .
  . . . . 5 . . . . . . . . . 5 . . . .
  . . . . . 4 . . . . . . . 4 . . . . .
  . . . . . . 3 . . . . . 3 . . . . . .
  . . . . . . . 2 . . . 2 . . . . . . .
  . . . . . . . . 1 . 1 . . . . . . . .
  . . . . . . . . . 0 . . . . . . . . .
		

Crossrefs

Programs

  • Python
    ups = list(tuple(range(i, j)) for i in range(9) for j in range(i+2, 11))
    s = set(L[::-1] + R[1:] for L in ups for R in ups if L[0] == R[0])
    s |= set(L[:-1] + R[::-1] for L in ups for R in ups if L[-1] == R[-1])
    afull = sorted(int("".join(map(str, t))) for t in s if t[0] != 0)
    print(afull[:47]) # Michael S. Branicky, Aug 02 2022

A135601 Acute-angled numbers with an internal digit as the vertex.

Original entry on oeis.org

102, 103, 104, 105, 106, 107, 108, 109, 120, 130, 131, 132, 140, 141, 142, 143, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 165, 170, 171, 172, 173, 174, 175, 176, 180, 181, 182, 183, 184, 185, 186, 187, 190, 191, 192, 193, 194, 195
Offset: 1

Views

Author

Omar E. Pol, Dec 02 2007

Keywords

Comments

The structure of digits represents an acute angle. The vertex is an internal digit. In the graphic representation the points are connected by imaginary line segments from left to right. This sequence is finite. The final term has 14 digits: 98765432102468.

Examples

			Illustration using the final term of this sequence:
  9 . . . . . . . . . . . . .
  . 8 . . . . . . . . . . . 8
  . . 7 . . . . . . . . . . .
  . . . 6 . . . . . . . . 6 .
  . . . . 5 . . . . . . . . .
  . . . . . 4 . . . . . 4 . .
  . . . . . . 3 . . . . . . .
  . . . . . . . 2 . . 2 . . .
  . . . . . . . . 1 . . . . .
  . . . . . . . . . 0 . . . .
		

Crossrefs

Programs

  • Python
    progressions = set(tuple(range(i, j+1, d)) for i in range(10) for d in range(1, 10-i) for j in range(i+d, 10))
    s = set()
    for left in progressions:
        for right in progressions:
            dl, dr = left[1] - left[0], right[1] - right[0]
            if dl + dr > 2:
                if left[-1] == right[-1]: s.add(left[:-1] + right[::-1])
                if left[0] == right[0]: s.add(left[::-1] + right[1:])
    afull = sorted(int("".join(map(str, t))) for t in s if t[0] != 0)
    print(afull[:53]) # Michael S. Branicky, Aug 02 2022

Formula

If a(n) does not end in 0, then A004086(a(n)) is a term; if a(n) does not start with 9, then A061601(a(n)) is a term. - Michael S. Branicky, Aug 02 2022

A135603 Obtuse-angled numbers with an internal digit as the vertex.

Original entry on oeis.org

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
Offset: 1

Views

Author

Omar E. Pol, Dec 02 2007

Keywords

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

Examples

			Illustration of the number 9753111:
  9 . . . . . .
  . . . . . . .
  . 7 . . . . .
  . . . . . . .
  . . 5 . . . .
  . . . . . . .
  . . . 3 . . .
  . . . . . . .
  . . . . 1 1 1
  . . . . . . .
		

Crossrefs

Programs

  • 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

Extensions

a(49) and beyond from Michael S. Branicky, Aug 03 2022

A163278 Concave-convex numbers.

Original entry on oeis.org

1010, 1011, 1020, 1021, 1022, 1023, 1030, 1031, 1032, 1033, 1034, 1035, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071
Offset: 1

Views

Author

Omar E. Pol, Oct 16 2009

Keywords

Comments

Numbers with more than three digits that are not straight-line numbers (A135643), concave numbers (A135642) or convex numbers (A135641).

Examples

			The number of this sequence (A163278) is a concave-convex number:
. . . . . .
. . . . . 8
. . . . 7 .
. 6 . . . .
. . . . . .
. . . . . .
. . 3 . . .
. . . 2 . .
1 . . . . .
. . . . . .
		

Crossrefs

Programs

  • PARI
    is(n) = my (d=digits(n), cvx=0, ccv=0, str=0); for (i=1, #d-2, my (x=d[i]+d[i+2]-2*d[i+1]); if (x>0, cvx++, x<0, ccv++, str++)); return (cvx>0 && ccv>0) \\ Rémy Sigrist, Aug 09 2017

A134999 Triangle-shaped numbers.

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
Offset: 1

Views

Author

Omar E. Pol, Dec 05 2007

Keywords

Comments

The structure of digits represents a triangle. Three digits are the vertex. In the graphic representation the points are connected by imaginary line segments. All 3-digit numbers are terms of this sequence, except for the straight-line numbers A135643. For 4 or more digits the terms are 1000, 1011, 1012, 1024, 1034, 1036, ...

Examples

			The triangle number 1024:
  . . . 4
  . . . .
  . . 2 .
  1 . . .
  . 0 . .
		

Crossrefs

Not to be confused with the triangular numbers, A000217!

A135999 Numbers that are both triangular numbers A000217 and triangle-shaped numbers A134999.

Original entry on oeis.org

105, 120, 136, 153, 171, 190, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 703, 780, 820, 861, 903, 946, 990, 1596, 1711, 2145, 2346, 3240, 3321, 3486, 3570, 3741, 4371, 4560, 4753, 5565
Offset: 1

Views

Author

Omar E. Pol, Dec 10 2007

Keywords

Comments

The number 496 appears to be the unique perfect number A000396 of this sequence. The interesting numbers 120 and 153 are supertriangular numbers.

Examples

			The numbers 120 as a triangle-shaped number A134999:
. 2 .
1 . .
. . 0
The number 120 as a triangular number A000217:
. . . . . . . O
. . . . . . .O O
. . . . . . O O O
. . . . . .O O O O
. . . . . O O O O O
. . . . .O O O O O O
. . . . O O O O O O O
. . . .O O O O O O O O
. . . O O O O O O O O O
. . .O O O O O O O O O O
. . O O O O O O O O O O O
. .O O O O O O O O O O O O
. O O O O O O O O O O O O O
.O O O O O O O O O O O O O O
O O O O O O O O O O O O O O O <--- A000217(15)=120.
		

Crossrefs

Showing 1-8 of 8 results.