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.

Previous Showing 11-20 of 21 results. Next

A120827 a(n) consecutive digits ascending beginning with the digit 9 give a prime.

Original entry on oeis.org

13, 29, 43
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 9 and after 9 comes 0.
The sequence "a(n) consecutive digits descending beginning with the digit 9 give a prime" has no terms.
There is no further term up to 26000. - Farideh Firoozbakht, Sep 11 2006
There is no further term up to 150000. - Michael S. Branicky, Apr 22 2025

Examples

			13 is a term since 9012345678901 is a prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[8+Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 5000}]; lst
    Flatten[Position[Table[FromDigits[PadRight[{},n,{9,0,1,2,3,4,5,6,7,8}]],{n,100}],?PrimeQ]] (* _Harvey P. Dale, Sep 06 2015 *)

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

A071363 Largest n-digit prime with strictly increasing digits.

Original entry on oeis.org

7, 89, 569, 5689, 34679, 345689, 1456789, 23456789
Offset: 1

Views

Author

Rick L. Shepherd, May 21 2002

Keywords

Comments

Notice the terms with consecutive digits; search for 23456789 to find several related sequences including A006055, A052017 and A052077.

Examples

			a(1) = A052015(4), a(2) = A052015(15), a(3) = A052015(35), a(4) = A052015(61), ... In short, a(n) = A052015(b(n)) with b = (4, 15, 35, 61, 81, 94, 98, 100). - _M. F. Hasler_, May 03 2017
		

Crossrefs

Subsequence of A052015.

Programs

  • PARI
    A071363(n,u=vectorv(n,i,10^(n-i)))={forvec(d=vector(n,i,[1,9]),isprime(d*u)&&n=d*u,2);n} \\ M. F. Hasler, May 03 2017

A052016 Primes with digits in descending order that differ exactly by 1.

Original entry on oeis.org

2, 3, 5, 7, 43, 76543
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1999

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    fQ[n_]:=Module[{id=IntegerDigits[n],}, n < 10 || Union[Differences[id]] == {-1}]; Select[Prime[Range[10000]], fQ] (* Vladimir Joseph Stephan Orlovsky, Dec 29 2010 *)

A059043 Numbers in which each digit is the (immediate) successor of the previous one (if it exists) and 0 is considered the successor of 9.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 23, 34, 45, 56, 67, 78, 89, 90, 123, 234, 345, 456, 567, 678, 789, 890, 901, 1234, 2345, 3456, 4567, 5678, 6789, 7890, 8901, 9012, 12345, 23456, 34567, 45678, 56789, 67890, 78901, 89012, 90123, 123456, 234567, 345678, 456789
Offset: 1

Views

Author

Thomas Schulze (jazariel(AT)tiscalenet.it), Feb 12 2001

Keywords

Comments

Numbers that are contiguous substrings of those in A062273. - Michael S. Branicky, May 26 2022

Crossrefs

Programs

  • Python
    def ok(n):
        s = str(n)
        return s == "".join(str((int(s[0])+i)%10) for i in range(len(s)))
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, May 26 2022
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        yield 0
        for d in count(1):
            for s0 in range(1, 10):
                yield int("".join(str((s0+i)%10) for i in range(d)))
    print(list(islice(agen(), 50))) # Michael S. Branicky, May 26 2022

Extensions

More terms from Brian DiCesare (bdicesar(AT)ashland.edu), Oct 11 2004
a(1) = 0 inserted by Michael S. Branicky, May 26 2022

A120804 Primes with consecutive digits descending.

Original entry on oeis.org

2, 3, 5, 7, 43, 109, 10987, 76543, 10987654321098765432109876543210987, 4321098765432109876543210987654321098765432109876543210987654321
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits can be in descending order. After 0 comes 9.
a(15) has 1053 digits. - Michael S. Branicky, Aug 05 2022

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = Reverse@ Range@n, t = Table[1, {n}]}, Select[ Drop[ Union@ Flatten@ Table[ FromDigits[ Mod[d + i*t, 10]], {i, 10}], 2], PrimeQ@# &]]; Array[f, 1000] // Flatten
  • Python
    from sympy import isprime
    from itertools import count, islice
    def bgen(): yield from (int("".join(str((s0-i)%10) for i in range(d))) for d in count(1) for s0 in range(1, 10))
    def agen(): yield from filter(isprime, bgen())
    print(list(islice(agen(), 10))) # Michael S. Branicky, Aug 05 2022

Extensions

Corrected by Paul Tek, May 08 2013

A161760 Composites with consecutive (ascending) digits.

Original entry on oeis.org

4, 6, 8, 9, 12, 34, 45, 56, 78, 90, 123, 234, 345, 456, 567, 678, 789, 890, 901, 1234, 2345, 3456, 5678, 6789, 7890, 8901, 9012, 12345, 23456, 34567, 45678, 56789, 67890, 89012, 90123
Offset: 1

Views

Author

Claudio Meller, Jun 18 2009

Keywords

Crossrefs

A120805 Primes with consecutive digits.

Original entry on oeis.org

2, 3, 5, 7, 23, 43, 67, 89, 109, 4567, 10987, 76543, 78901, 678901, 23456789, 45678901, 9012345678901, 789012345678901, 56789012345678901234567890123, 90123456789012345678901234567, 10987654321098765432109876543210987
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits can be in ascending or descending order. After 9 comes 0 or after 0 comes 1.
The number of primes with n consecutive digits: 4,4,1,1,3,1,0,2,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,...,.

Crossrefs

Cf. A000040, A118697; union of A006055 & A120804.

Programs

  • Mathematica
    f[n_] := Block[{u = Range@n, d = Reverse@ Range@n, t = Table[1, {n}]}, Select[ Drop[ Union@ Flatten@ Table[ FromDigits /@ Mod[{u, d} + {i*t, i*t}, 10], {i, 10}], 2], PrimeQ@# &]]; Array[f, 35] // Flatten

A215477 Semiprimes with consecutive (ascending) digits.

Original entry on oeis.org

4, 6, 9, 34, 123, 789, 901, 1234, 34567, 56789, 901234, 1234567, 7890123, 567890123, 12345678901, 345678901234567, 4567890123456789, 12345678901234567, 890123456789012345, 3456789012345678901, 456789012345678901234, 123456789012345678901234567, 1234567890123456789012345678901, 23456789012345678901234567890123
Offset: 1

Views

Author

Jonathan Vos Post, Aug 12 2012

Keywords

Comments

This is to semiprimes A001358 as A006055 is to primes.

Examples

			a(9) = 34567 because it is semiprime 13 * 2659, and (3,4,5,6,7) are consecutive ascending digits.
		

Crossrefs

Programs

  • Maple
    R:= 4, 6, 9: V:= [$1..9]:
    for d from 2 to 50 do
    V:= map(n -> 10*n + ((n+1) mod 10), V);
    W:= select(t -> numtheory:-bigomega(t)=2, V);
    R:= R, op(W);
    od:
    R; # Robert Israel, Nov 15 2023

Extensions

Corrected and extended by R. J. Mathar, Aug 13 2012

A215478 Semiprimes with digits in descending order that differ exactly by 1.

Original entry on oeis.org

4, 6, 9, 10, 21, 65, 87, 321, 543, 4321, 8765, 98765, 654321, 876543, 7654321
Offset: 1

Views

Author

Jonathan Vos Post, Aug 12 2012

Keywords

Comments

This is to semiprimes A001358 as A052016 is to primes A000040.

Examples

			4321 is in the sequence because it is semiprime 4321 = 29 * 149, and (4,3,2,1) are descending consecutive digits.
		

Crossrefs

Programs

  • Mathematica
    Sort[Flatten[Table[Select[FromDigits/@Partition[Range[9,0,-1],n,1], PrimeOmega[#] == 2&],{n,10}]]] (* Harvey P. Dale, Jul 10 2014 *)

Extensions

Corrected and extended by R. J. Mathar, Aug 13 2012
Previous Showing 11-20 of 21 results. Next