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

A006510 Duplicate of A006055.

Original entry on oeis.org

2, 3, 5, 7, 23, 67, 89, 4567, 78901, 678901, 23456789, 45678901, 9012345678901
Offset: 1

Views

Author

N. J. A. Sloane, Jun 13 2012

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

A048398 Primes with consecutive digits that differ exactly by 1.

Original entry on oeis.org

2, 3, 5, 7, 23, 43, 67, 89, 101, 787, 4567, 12101, 12323, 12343, 32321, 32323, 34543, 54323, 56543, 56767, 76543, 78787, 78989, 210101, 212123, 234323, 234343, 432121, 432323, 432343, 434323, 454543, 456767, 654323, 654343, 678767, 678989
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Comments

Or, primes in A033075. - Zak Seidov, Feb 01 2011

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 67, p. 23, Ellipses, Paris 2008.

Crossrefs

Cf. A010051; intersection of A033075 and A000040.

Programs

  • Haskell
    a048398 n = a048398_list !! (n-1)
    a048398_list = filter ((== 1) . a010051') a033075_list
    -- Reinhard Zumkeller, Feb 21 2012, Nov 04 2010
    (Python 3.2 or higher)
    from itertools import product, accumulate
    from sympy import isprime
    A048398_list = [2,3,5,7]
    for l in range(1,17):
        for d in [1,3,7,9]:
            dlist = [d]*l
            for elist in product([-1,1],repeat=l):
                flist = [str(d+e) for d,e in zip(dlist,accumulate(elist)) if 0 <= d+e < 10]
                if len(flist) == l and flist[-1] != '0':
                    n = 10*int(''.join(flist[::-1]))+d
                    if isprime(n):
                        A048398_list.append(n)
    A048398_list = sorted(A048398_list) # Chai Wah Wu, May 31 2017
  • Mathematica
    Select[Prime[Range[10000]], # < 10 || Union[Abs[Differences[IntegerDigits[#]]]] == {1} &]

A120819 Indices of primes in A057137.

Original entry on oeis.org

171, 277, 367, 561, 567, 18881
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 1 and after 9 comes 0.
Indices of primes in A057137.
All terms must end in 1 or 7: A057137(n) is even when n is even, and divisible by 3 iff n == 0, 2, 3, 5, 6, 8 or 9 (mod 10). - M. F. Hasler, Apr 14 2024
a(7) >= 100000. - Michael S. Branicky, Apr 07 2025

Examples

			a(1) = 12345678901234567890...01234567890...012345678901 = A057137(171) is the first prime term in A057137.
		

References

  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 61, 298.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 10000}]; lst
    IntegerLength[Select[Table[FromDigits[PadRight[{},n,{1,2,3,4,5,6,7,8,9,0}]],{n,1,1001,2}],PrimeQ]] (* Harvey P. Dale, Feb 07 2024 *)
  • PARI
    N=0;for(n=1,600,if(ispseudoprime(N=10*N+n%10),print1(n", "))) \\ Charles R Greathouse IV, May 10 2014  (Comment: Surprisingly, this is faster than calling ispseudoprime() only when n ends in 1 or 7, even when much larger N's are considered, e.g., up to 3000. - M. F. Hasler, Apr 14 2024)
    
  • Python
    from sympy import isprime
    L = ['8901', '234567']; s = '1234567'; c = len(s); m = 0
    while c < 18881:
        s += L[m%2]; c = len(s); m += 1
        if isprime(int(s)): print(c, end = ', ')  # Ya-Ping Lu, Jan 24 2025

Extensions

a(6) from Arjen Lenstra, Feb 20 2012

A120821 a(n) consecutive digits ascending beginning with the digit 3 give a prime.

Original entry on oeis.org

1, 179, 529, 62625
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 3 and after 9 comes 0.
The sequence "a(n) consecutive digits descending beginning with the digit 3 give a prime." has only one term, 1 which represents the prime 3.
a(5) > 10^5. - Michael S. Branicky, Apr 08 2025

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[2+Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 10000}]; lst

Extensions

a(4) from Michael S. Branicky, Apr 03 2025

A120822 a(n) consecutive digits ascending beginning with the digit 4 give a prime.

Original entry on oeis.org

4, 8, 194
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 4; after 9 comes 0.
a(4) > 10^5. - Michael S. Branicky, Apr 08 2025

Examples

			8 is a term since 45678901 is a prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[3+Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 10000}]; lst

A120820 a(n) consecutive digits ascending beginning with the digit 2 give a prime.

Original entry on oeis.org

1, 2, 8, 82, 118, 158, 2122, 2242, 2388
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 2 and after 9 comes 0.
The sequence "a(n) consecutive digits descending beginning with the digit 2 give a prime" has only one term, 1 which represents the prime 2.
a(10) > 10^5. - Michael S. Branicky, Apr 10 2025

Examples

			8 is a term since 23456789 is a prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[1+Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 10000}]; lst

A120823 a(n) consecutive digits ascending beginning with the digit 5 give a prime..

Original entry on oeis.org

1, 29, 269, 689
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 5 and after 9 comes 0.
The sequence "a(n) consecutive digits descending beginning with the digit 5 give a prime." has only one term, 1 which represents the prime 5.
a(5) > 10^5. - Michael S. Branicky, Apr 08 2025

Examples

			29 is a term since the 29-digit number 56789012345678901234567890123 is a prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[4+Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 9000}]; lst

A120824 a(n) consecutive digits ascending beginning with the digit 6 give a prime.

Original entry on oeis.org

2, 6, 36, 122, 336, 82812
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 6 and after 9 comes 0.
The sequence "a(n) consecutive digits descending beginning with the digit 6 give a prime" has no terms.
a(7) >= 100000. - Michael S. Branicky, Apr 07 2025

Examples

			6 is a term since 678901 is a prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[5+Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 5000}]; lst

Extensions

a(6) from Michael S. Branicky, Apr 05 2025

A120825 a(n) consecutive digits ascending beginning with the digit 7 give a prime.

Original entry on oeis.org

1, 5, 15, 51, 8411
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 7 and after 9 comes 0.
The sequence "a(n) consecutive digits descending beginning with the digit 7 give a prime" has only two terms below 6001, namely 1 and 5, which represent the primes 7 and 76543, respectively.
a(6) >= 100000. - Michael S. Branicky, Apr 07 2025

Examples

			1 is here because 7 is prime.
5 is here because 78901 is prime.
15 is here because 789012345678901 is a prime.
51 is here because 789012345678901234567890123456789012345678901234567 is prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[6+Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 5000}]; lst

Extensions

a(5) from Bert Dobbelaere, Apr 01 2025

A120826 a(n) consecutive digits ascending beginning with the digit 8 give a prime.

Original entry on oeis.org

2, 82, 152, 7066, 84892
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 8 and after 9 comes 0.
The sequence "a(n) consecutive digits descending beginning with the digit 8 give a prime" has no terms.
a(6) > 10^5. - Michael S. Branicky, Apr 11 2025

Examples

			2 is a term since 89 is a prime.
82 is a term because 8901234567890123456789012345678901234567890123456789012345678901234567890123456789 is a prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[7+Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 5000}]; lst

Extensions

a(4) from Bert Dobbelaere, Apr 01 2025
a(5) from Michael S. Branicky, Apr 03 2025
Showing 1-10 of 21 results. Next