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 14 results. Next

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

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

A134811 Giza primes.

Original entry on oeis.org

2, 3, 5, 7, 787, 34543, 345676543, 34567876543
Offset: 1

Views

Author

Omar E. Pol, Nov 30 2007

Keywords

Comments

Giza numbers (A134810) that are prime numbers. For n > 4 the structure of digits represents a pyramid at Giza. Also the top of a mountain. This sequence has only these 8 terms in base 10. For more information, see A134810.

Examples

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

References

  • Chris K. Caldwell and G. L. Honaker, Jr; Prime Curios!, The Dictionary of Prime Number Trivia, CreateSpace (2009), p. 209.

Crossrefs

Programs

  • Mathematica
    ups = Flatten[Table[Range[i, j - 1], {i, 1, 9}, {j, i + 1, 10}], 1];afull = Sort[  Map[ToExpression@StringJoin@Map[ToString, #[[;; -2]] ~Join~ Reverse[#]] &, ups]];Select[afull,PrimeQ] (* James C. McMahon, Apr 11 2025 *)

Formula

A000040 INTERSECT A134810. - Omar E. Pol, Mar 25 2011

Extensions

Reference and link added by Omar E. Pol, Mar 25 2011

A173071 Palindromic mountain primes.

Original entry on oeis.org

131, 151, 181, 191, 12421, 12721, 12821, 13831, 13931, 14741, 17971, 1235321, 1245421, 1257521, 1268621, 1278721, 1456541, 1469641, 1489841, 1579751, 1589851, 123484321, 123494321, 123575321, 136797631, 167898761, 12345854321
Offset: 1

Views

Author

Omar E. Pol, Feb 09 2010

Keywords

Comments

All terms have an odd number of digits. - Emeric Deutsch, Mar 09 2010

Examples

			a(6) = 12721; is a palindromic mountain prime.
. . . . .
. . . . .
. . 7 . .
. . . . .
. . . . .
. . . . .
. . . . .
. 2 . 2 .
1 . . . 1
		

Crossrefs

Programs

  • Maple
    a := proc (n) local rev, n1: rev := proc (n) local nn: nn := convert(n, base, 10): add(nn[j]*10^(nops(nn)-j), j = 1 .. nops(nn)) end proc: n1 := convert(n, base, 10): if n1[1]=1 and isprime(n) = true and rev(n) = n and n1[1] < n1[2] and n1[2] < n1[3] and n1[3] < n1[4] then n else end if end proc: seq(a(n), n = 1000000 .. 9999999); # this program works only for 7-digit numbers; easily adjustable for other (2k+1)-digit numbers # Emeric Deutsch, Mar 09 2010
  • Python
    from itertools import combinations
    from gmpy2 import is_prime
    A173071_list = []
    for l in range(1,10):
        for i in combinations('23456789',l):
            s = '1'+''.join(i)
            p = int(s+s[l-1::-1])
            if is_prime(p):
                A173071_list.append(p) # Chai Wah Wu, Nov 05 2015

Extensions

More terms from Emeric Deutsch, Mar 09 2010, corrected Mar 19 2010
a(22)-a(27) from Donovan Johnson, Jul 22 2010

A261618 Concatenation of n, n+1 and n.

Original entry on oeis.org

121, 232, 343, 454, 565, 676, 787, 898, 9109, 101110, 111211, 121312, 131413, 141514, 151615, 161716, 171817, 181918, 192019, 202120, 212221, 222322, 232423, 242524, 252625, 262726, 272827, 282928, 293029, 303130, 313231, 323332, 333433, 343534, 353635, 363736
Offset: 1

Views

Author

Keywords

Comments

787, 9109, 111211, 131413, ... are primes. - N. J. A. Sloane, Sep 21 2015

Examples

			a(1) = concatenation(1, 2, 1) = 121.
a(10) = concatenation(10, 11, 10) = 101110.
		

Crossrefs

Programs

  • Magma
    [Seqint(Intseq(n) cat Intseq(n+1) cat Intseq(n)):n in [1..36]]; // Marius A. Burtea, Dec 29 2019
  • Maple
    f:= n -> n + 10^(1+ilog10(n))*(n+1)+10^(2+ilog10(n)+ilog10(n+1))*n:
    map(f, [$1..100]); # Robert Israel, Dec 29 2019
  • Mathematica
    Map[FromDigits@ Join[#1, #2, #1] & @@ IntegerDigits[#] &, Partition[Range@ 37, 2, 1]] (* Michael De Vlieger, Dec 29 2019 *)
  • PARI
    a(n) = eval(concat(Str(n), concat(Str(n+1), Str(n)))); \\ Michel Marcus, Sep 10 2015
    

Extensions

More terms from Michel Marcus, Sep 10 2015

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!

A173070 Palindromic mountain numbers.

Original entry on oeis.org

1, 121, 131, 141, 151, 161, 171, 181, 191, 12321, 12421, 12521, 12621, 12721, 12821, 12921, 13431, 13531, 13631, 13731, 13831, 13931, 14541, 14641, 14741, 14841, 14941, 15651, 15751, 15851, 15951, 16761, 16861, 16961, 17871, 17971, 18981
Offset: 1

Views

Author

Omar E. Pol, Feb 09 2010

Keywords

Comments

There are 256 terms, the last of which is 12345678987654321. - Michael S. Branicky, Aug 04 2022

Examples

			13731 is in the sequence because it is a palindrome (A002113) and it is also a mountain number (A134941).
. . . . .
. . . . .
. . 7 . .
. . . . .
. . . . .
. . . . .
. 3 . 3 .
. . . . .
1 . . . 1
		

Crossrefs

Programs

  • Python
    from itertools import chain, combinations as combs
    def c(s): return s[0] == s[-1] == 1 and s == s[::-1]
    ups = list(chain.from_iterable(combs(range(10), r) for r in range(2, 11)))
    s = set(L[:-1] + R[::-1] for L in ups for R in ups if L[-1] == R[-1])
    afull = [1] + sorted(int("".join(map(str, t))) for t in s if c(t))
    print(afull[:40]) # Michael S. Branicky, Aug 04 2022

A193409 Crater numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 101, 212, 323, 434, 545, 656, 767, 878, 989, 21012, 32123, 43234, 54345, 65456, 76567, 87678, 98789, 3210123, 4321234, 5432345, 6543456, 7654567, 8765678, 9876789, 432101234, 543212345, 654323456, 765434567, 876545678, 987656789, 54321012345, 65432123456, 76543234567, 87654345678, 98765456789, 6543210123456, 7654321234567, 8765432345678, 9876543456789, 765432101234567, 876543212345678, 987654323456789, 87654321012345678, 98765432123456789, 9876543210123456789
Offset: 1

Views

Author

Jaroslav Krizek, Jul 25 2011

Keywords

Comments

For n>9 the structure of digits represents a crater. The first and last digit of each term are identical. The first digits are in consecutive decreasing order. The last digits are in consecutive increasing order. The numbers have only one smallest digit. The number of digits is odd. This sequence is finite with 55 terms. The final term is 9876543210123456789.
Finite subset of primes of this sequence: 2, 3, 5, 7, 101, 7654567.
There are 11 - k terms with 2*k - 1 digits. - Omar E. Pol, Aug 04 2011

Examples

			Illustration using a(32)=7654567:
  7  .  .  .  .  .  7
  .  6  .  .  .  6  .
  .  .  5  .  5  .  .
  .  .  .  4  .  .  .
		

Crossrefs

Subset of palindromes (A002113), A193412 and valley numbers (A193413).
Cf. A134810, A134970. - Omar E. Pol, Aug 04 2011

Programs

  • Mathematica
    Flatten[Table[FromDigits/@(Join[Reverse[Rest[#]],#]&/@Partition[ Range[ 0,9],n,1]),{n,10}]] (* Harvey P. Dale, Dec 27 2018 *)
  • Python
    ups = [tuple(range(i, j)) for i in range(10) for j in range(i+1, 11)]
    afull = sorted(int("".join(map(str, u[::-1] + u[1:]))) for u in ups)
    print(afull) # Michael S. Branicky, Aug 02 2022

Extensions

Corrected and extended by Jaroslav Krizek, Jul 27 2011
Showing 1-10 of 14 results. Next