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

A052017 Primes with digits in ascending order that differ exactly by 1.

Original entry on oeis.org

2, 3, 5, 7, 23, 67, 89, 4567, 23456789
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1999

Keywords

Comments

Primes in A138141. - Omar E. Pol, Dec 07 2008

Crossrefs

Cf. A138141. - Omar E. Pol, Dec 07 2008

A138142 Nonnegative numbers with digits in descending order that differ exactly by 1.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 32, 43, 54, 65, 76, 87, 98, 210, 321, 432, 543, 654, 765, 876, 987, 3210, 4321, 5432, 6543, 7654, 8765, 9876, 43210, 54321, 65432, 76543, 87654, 98765, 543210, 654321, 765432, 876543, 987654
Offset: 1

Views

Author

Omar E. Pol, Mar 19 2008

Keywords

Comments

This finite sequence has 55 members. The last member is 9876543210. There are 11-k members with k digits. See A052016 for primes in this sequence. All members with 3 or more digits are straight-line numbers A135643.

Examples

			Last 10 members of this finite sequence:
a(45)=6543210
a(46)=7654321
a(47)=8765432
a(48)=9876543
a(49)=76543210
a(50)=87654321
a(51)=98765432
a(52)=876543210
a(53)=987654321
a(54)=9876543210
		

Crossrefs

Programs

  • Mathematica
    fQ[n_]:=Module[{id=IntegerDigits[n]}, n<10 || Union[Differences[id]]=={-1}]; Select[Range[0, 100000], fQ] (* Vladimir Joseph Stephan Orlovsky, Dec 29 2010 *)
    Sort[Flatten[With[{t=Range[9,0,-1]},Table[FromDigits/@Partition[t,n,1],{n,10}]]]] (* Harvey P. Dale, Oct 31 2013 *)

Extensions

Examples corrected by Omar E. Pol, Dec 06 2008

A288528 Numbers with consecutive positive decimal digits after the digits are sorted.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 123, 132, 213, 231, 234, 243, 312, 321, 324, 342, 345, 354, 423, 432, 435, 453, 456, 465, 534, 543, 546, 564, 567, 576, 645, 654, 657, 675, 678, 687, 756, 765, 768, 786, 789, 798, 867, 876, 879, 897, 978, 987
Offset: 1

Views

Author

Omar E. Pol, Jun 15 2017

Keywords

Comments

The last term is a(462331) = 987654321.
Observation: the number of terms mentioned above is also A014145(9). Also the sum of the 9th row in the triangle A288777.
It appears that the number of terms with k digits in this sequence is also A288777(9,k), k>=1.

Crossrefs

Subsequence of A215014.
Supersequence of A138141.

Programs

  • Python
    def ok(n): return "".join(sorted(str(n))) in "123456789"
    print([k for k in range(999) if ok(k)]) # Michael S. Branicky, Aug 04 2022
    
  • Python
    # alternate for generating full sequence instantly
    from itertools import permutations
    frags = ["123456789"[i:j] for i in range(9) for j in range(i+1, 10)]
    afull = sorted(int("".join(s)) for f in frags for s in permutations(f))
    print(afull[:70]) # Michael S. Branicky, Aug 04 2022

A178355 Fibonacci numbers with digits increased by 1.

Original entry on oeis.org

0, 1, 2, 3, 5, 8, 34, 89
Offset: 1

Views

Author

Felix Tubiana, May 25 2010

Keywords

Comments

Fibonacci numbers such that they are either one-digit numbers or their digits all have differences of 1. - Harvey P. Dale, Jun 09 2022

Crossrefs

Formula

{ A000045 } intersect { A138141 }. - Alois P. Heinz, Jul 05 2022

Extensions

Offset set to 1 by Alois P. Heinz, Jul 05 2022

A344549 Largest prime with strictly ascending consecutive digits in base n.

Original entry on oeis.org

5, 11, 19, 569, 41, 2423, 207593, 23456789, 811, 160403, 95401, 235776949, 208888661909, 9927935178558959, 889872307619, 14707209648376466477, 1245691, 340387811, 96209320840499118292907, 9614505639105223858867, 1068038871569, 28923381229, 202821360694037, 409991957243270502360389
Offset: 3

Views

Author

Hervé Loiseau, May 22 2021

Keywords

Comments

This sequence in ascending bases, starting with base 3: 12, 23, 34, 2345, 56, 4567, 345678, 23456789, 678, 789AB, 34567, 23456789, 56789ABCDE, 23456789ABCDEF, 789ABCDEFG, 23456789ABCDEFGH, 9ABCD, 56789AB, 3456789ABCDEFGHIJK, 3456789ABCDEFGHIJ, DEFGHIJKL, 6789ABCD, 23456789ABC, 9ABCDEFGHIJKLMNOP.

Examples

			12_3 = 5 is the largest prime number with strictly ascending digits for this base.
		

Crossrefs

Programs

  • PARI
    a(n)={forstep(k=n-1, 1, -1, forstep(j=n-k, 1, -1, my(t=fromdigits([j..j+k-1], n)); if(isprime(t), return(t)))); oo} \\ Andrew Howroyd, May 22 2021

A352927 Numbers whose digits are nonzero, consecutive, and all increasing or all decreasing.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 123, 234, 321, 345, 432, 456, 543, 567, 654, 678, 765, 789, 876, 987, 1234, 2345, 3456, 4321, 4567, 5432, 5678, 6543, 6789, 7654, 8765, 9876, 12345, 23456, 34567, 45678, 54321, 56789, 65432, 76543, 87654, 98765, 123456, 234567, 345678
Offset: 1

Views

Author

N. J. A. Sloane, May 01 2022, following a suggestion from Ralph Sieber

Keywords

Comments

There are 81 terms, corresponding to numbers that start with i and end with j, for 1 <= i <= 9, 1 <= j <= 9. - Michael S. Branicky, May 01 2022

Crossrefs

Programs

  • Mathematica
    Join[Range[9],Select[Range[350000],DigitCount[#,10,0]==0&&(Union[Differences[IntegerDigits[ #]]]=={1}||Union[Differences[IntegerDigits[#]]]=={-1})&]] (* Harvey P. Dale, Aug 13 2023 *)
  • Python
    def sgn(n): return 1 if n >= 0 else -1
    def afull(): return sorted(int("".join(map(str, range(i, j+sgn(j-i), sgn(j-i))))) for i in range(1, 10) for j in range(1, 10))
    print(afull()) # Michael S. Branicky, May 01 2022
Showing 1-6 of 6 results.