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

A109177 Eight-digit primes which use each of 0-to-7 decimal digits exactly once.

Original entry on oeis.org

10235647, 10236547, 10243567, 10243657, 10245637, 10247563, 10254367, 10254763, 10256347, 10256473, 10257463, 10264357, 10264537, 10346257, 10356427, 10364527, 10425367, 10425637, 10425673, 10426357, 10426753
Offset: 1

Views

Author

Zak Seidov, Jun 21 2005

Keywords

Comments

There are exactly 2668 eight-digit primes using digits 0-to-7 exactly once: here the smallest ones are given; cf. A109178 with the largest ones.

Crossrefs

Cf. A109178.

Programs

  • Mathematica
    Take[FromDigits/@Select[Permutations[Range[0,7]],First[#]!=0&&PrimeQ[ FromDigits[ #]]&],50] (* Harvey P. Dale, Aug 16 2011 *)

A109176 Five-digit primes which use each of the decimal digits 0 through 4 exactly once.

Original entry on oeis.org

10243, 12043, 20143, 20341, 20431, 23041, 24103, 30241, 32401, 40123, 40213, 40231, 41023, 41203, 42013, 43201
Offset: 1

Views

Author

Zak Seidov, Jun 21 2005

Keywords

Comments

There are exactly 16 five-digit primes using the decimal digits 0 through 4 exactly once. There are exactly 2668 eight-digit primes using the digits 0 through 7 exactly once: A109177 (smallest ones), A109178 (largest ones).
This is a subsequence of A187796 = A109176 union A109177, which comprises all primes of that form (in decimal notation). - M. F. Hasler, Jan 06 2013

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Permutations[{0,1,2,3,4}],#>10^4&&PrimeQ[#]&] (* James C. McMahon, Mar 06 2024 *)

A187796 Primes whose digits are a permutation of (0, ..., m) for some m.

Original entry on oeis.org

10243, 12043, 20143, 20341, 20431, 23041, 24103, 30241, 32401, 40123, 40213, 40231, 41023, 41203, 42013, 43201, 10235647, 10236547, 10243567, 10243657, 10245637, 10247563, 10254367, 10254763, 10256347, 10256473, 10257463, 10264357
Offset: 1

Views

Author

M. F. Hasler, Jan 06 2013

Keywords

Comments

Starts with the 5-digit terms listed in A109176: There is no smaller prime of that form, since there is no odd number of that form with less than 3 digits, and those with digits {0,1,2} and {0,1,2,3} (as, e.g., 2013...) are all divisible by 3, thus composite.
For similar reasons, there cannot be terms with the 6 digits {0, ..., 5} or the 7 digits {0, ..., 6} (since 1 + ... + 5 (+ 6) is divisible by 3).
The 8-digit terms a(17)..a(2684) are also listed in A109177 and A109178 (in reverse order). Again, there are no 9- or 10-digit terms (since 0+1+...+8(+9) is divisible by 9). Therefore, the sequence has no terms beyond the 2684 terms < 76543210 listed in the b-file.

Examples

			As explained in the comments, there cannot be a term with fewer than 5 digits. The smallest number whose digits are a permutation of (0, ..., 4) is 10234, but this is even and cannot be a prime. The next larger one happens to be prime, so that's a(1) = 10243.
It is also explained in the comments why there's no term larger than 76543210. The largest odd numbers of the given form below this limit are of the form 7654xyz1 and 7654abc3, with xyz resp. abc permutations of 023 resp. 012. It happens that the case xyz=023 is the only one which yields a prime: this is the largest term of this sequence, a(2684) = 76540231 = A109178(1).
		

Programs

  • Mathematica
    Select[Prime@ Range[10^6], {1} == Union@ Prepend[Differences@ #, 1 + First@ #] &@ Sort@ IntegerDigits@ # &] (* Michael De Vlieger, Aug 20 2017 *)
    Table[Select[FromDigits /@ Permutations[Range[0, n]], PrimeQ[ #] && DigitCount[ #, 10, 0] == 1 &], {n, 9}] // Flatten (* Harvey P. Dale, Jan 01 2020 *)
  • PARI
    forprime(p=2,,#vecsort(t=digits(p),,8)==#t && #t==vecmax(t)+1 && print1(p","))

Formula

This sequence A187796 = A109176 union A109177.

A109075 Number of primes which use each of 0-to-n decimal digits exactly once.

Original entry on oeis.org

0, 0, 0, 0, 16, 0, 0, 2668, 0, 0
Offset: 0

Views

Author

Zak Seidov, Jun 21 2005

Keywords

Comments

There are exactly 16 five-digit primes using decimal digits 0-to-4 exactly once: A109176 and 2668 eight-digit primes using each of 0-to-7 decimal digits exactly once: A109177, A109178. Cf. A094258.

Crossrefs

A109179 Eight-digit primes reverse of which is also prime such that each of decimal digits 0-to-7 used just once.

Original entry on oeis.org

10243657, 10247563, 10254367, 10254763, 10264537, 10356427, 10432567, 10452367, 10457263, 10467253, 10475263, 10562437, 10574623, 10654327, 10725643, 12067543, 12306457, 12360457, 12364507, 12460753, 12530647
Offset: 1

Views

Author

Zak Seidov, Jun 21 2005

Keywords

Comments

Among 2668 eight-digit primes which use each of the decimal digits 0-to-7 just once, there are 102 pairs of mutually reversed primes. Here some smallest ones are given.

Examples

			10243657 and its reverse 76534201 are both primes which use decimal digits 0-to-7 exactly once.
		

Crossrefs

Showing 1-5 of 5 results.