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-10 of 11 results. Next

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

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

A135641 Convex numbers.

Original entry on oeis.org

100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 112, 113, 114, 115, 116, 117, 118, 119, 124, 125, 126, 127, 128, 129, 136, 137, 138, 139, 148, 149, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 211, 212, 213, 214, 215, 216, 217
Offset: 1

Views

Author

Omar E. Pol, Nov 30 2007

Keywords

Comments

The structure of digits represents a convex function or a convex object. In the graphic representation the points are connected by imaginary line segments from left to right.

Examples

			The number 742235 is a convex number.
  . . . . . .
  . . . . . .
  7 . . . . .
  . . . . . .
  . . . . . 5
  . 4 . . . .
  . . . . 3 .
  . . 2 2 . .
  . . . . . .
  . . . . . .
		

Crossrefs

Cf. A135642 (concave numbers), A135643 (straight line numbers), A163278 (concave-convex numbers).

Programs

  • Mathematica
    convexQ[n_] := With[{dd = IntegerDigits[n]}, AllTrue[SequencePosition[dd, {, , _}][[All, 1]], dd[[#]] + dd[[#+2]] > 2 dd[[#+1]]&]];
    Select[Range[100, 300], convexQ] (* Jean-François Alcover, Nov 01 2018 *)
  • 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

A135600 Angled numbers with an internal digit as the vertex.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Dec 02 2007

Keywords

Comments

The structure of digits represents an angle. The vertex is an internal digit. In the graphic representation the points are connected by imaginary line segments from left to right. The last acute-angled number of this sequence has 14 digits: 98765432102468. The last right-angled number of this sequence has 19 digits: 9876543210123456789. All 3-digit numbers are terms of this sequence. Next terms are 1000, 1012, 1024, 1036, 1048, 1110, 1111, 1112, 1113, 1114, ....
For each k >= 20, there are 363 k-digit terms: 354 obtuse-angled and 9 straight-angled.- Michael S. Branicky, Aug 03 2022

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 . . . .
		

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

A167853 Generalized mountain primes.

Original entry on oeis.org

2, 3, 5, 7, 131, 151, 163, 173, 181, 191, 193, 197, 241, 251, 263, 271, 281, 283, 293, 353, 373, 383, 397, 461, 463, 487, 491, 563, 571, 587, 593, 673, 683, 691, 787, 797, 1231, 1283, 1291, 1297, 1321, 1361, 1373, 1381, 1451, 1453, 1471
Offset: 1

Views

Author

Omar E. Pol, Nov 13 2009, Nov 15 2009

Keywords

Comments

Primes in A134853. This sequence is finite because A134853 is.
Superset of A134951, mountain primes.
Question: How many terms are in this sequence?
The last term is a(7145) = 134567897654321. - Giovanni Resta, Mar 19 2013

Examples

			Illustration of 136973 as a generalized mountain prime:
. . . 9 . .
. . . . . .
. . . . 7 .
. . 6 . . .
. . . . . .
. . . . . .
. 3 . . . 3
. . . . . .
1 . . . . .
		

Crossrefs

Extensions

More terms provided. Harvey P. Dale, Aug 19 2010
a(37)-a(47) corrected by Giovanni Resta, Mar 19 2013

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

A167845 Concave primes.

Original entry on oeis.org

131, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 233, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 331, 353, 367, 373, 379, 383, 389, 397, 431, 443, 461, 463, 467, 479, 487, 491, 499, 541, 563, 571, 577, 587, 593, 599, 641, 653, 661, 673
Offset: 1

Views

Author

Omar E. Pol, Nov 13 2009

Keywords

Comments

Primes in A135642.
Primes whose 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.

Crossrefs

Extensions

More terms from Max Alekseyev, Apr 24 2010

A167846 Concave-convex primes.

Original entry on oeis.org

1021, 1031, 1033, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423
Offset: 1

Views

Author

Omar E. Pol, Nov 13 2009

Keywords

Comments

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

Crossrefs

Extensions

More terms from Rémy Sigrist, May 22 2019
Showing 1-10 of 11 results. Next