A323391
Primes containing nonprime digits (from 1 to 9) in their decimal expansion and whose digits are distinct, i.e., consisting of only digits 1, 4, 6, 8, 9.
Original entry on oeis.org
19, 41, 61, 89, 149, 419, 461, 491, 619, 641, 691, 941, 1489, 4691, 4861, 6481, 6491, 6841, 8419, 8461, 8641, 8941, 9461, 14869, 46819, 48619, 49681, 64189, 64891, 68491, 69481, 81649, 84691, 84961, 86491, 98641
Offset: 1
14869 is the smallest prime that contains all the nonprime positive digits; 98641 is the largest one.
- Chris K. Caldwell and G. L. Honaker, Jr., 81649, Prime Curios!
Cf.
A029743 (with distinct digits),
A124674 (with distinct prime digits),
A155045 (with distinct odd digits),
A323387 (with distinct square digits),
A323578 (with distinct digits for which parity of digits alternates).
-
Select[Union@ Flatten@ Map[FromDigits /@ Permutations@ # &, Rest@ Subsets@ {1, 4, 6, 8, 9}], PrimeQ] (* Michael De Vlieger, Jan 19 2019 *)
-
isok(p) = isprime(p) && (d=digits(p)) && vecmin(d) && (#Set(d) == #d) && (#select(x->isprime(x), d) == 0); \\ Michel Marcus, Jan 14 2019
A331346
Primes using all the square digits {0, 1, 4, 9} and no others.
Original entry on oeis.org
1049, 1409, 4019, 4091, 9041, 10499, 10949, 14009, 49019, 49109, 90149, 90401, 94109, 99041, 99401, 100049, 101149, 101419, 101449, 104009, 104119, 104149, 104491, 104911, 104999, 109049, 109141, 109441, 110419, 110491, 111049, 111409, 114901, 140009, 140191, 140419
Offset: 1
a(1) = 1049 is prime containing all the square digits (0, 1, 4, 9) and no others.
a(2) = 1409 is prime containing all the square digits (0, 1, 4, 9) and no others.
-
[p:p in PrimesUpTo(150000)|Set(Intseq(p)) eq {0,1,4,9}]; // Marius A. Burtea, Jan 14 2020
-
f:= proc(n) local L,x;
L:= convert(n,base,4);
if convert(L,set) <> {0,1,2,3} then return NULL fi;
L:= subs(2=4,3=9,L);
x:= add(L[i]*10^(i-1),i=1..nops(L));
if isprime(x) then x else NULL fi
end proc:
map(f, [$4^3..4^6]); # Robert Israel, Jan 16 2020
-
Select[FromDigits /@ Tuples[{0, 1, 4, 9}, 6], PrimeQ[#] && Union[IntegerDigits[#]] == {0, 1, 4, 9} &]
A323579
Primes formed by using the four terminal digits of multidigit primes and whose digits are distinct, i.e., consisting of only digits 1, 3, 7, 9.
Original entry on oeis.org
3, 7, 13, 17, 19, 31, 37, 71, 73, 79, 97, 137, 139, 173, 179, 193, 197, 317, 379, 397, 719, 739, 937, 971, 1973, 3719, 3917, 7193, 9137, 9173, 9371
Offset: 1
1973 and 9371 are respectively the smallest and the largest primes formed with the four digits that can end multidigit primes.
- Chris K. Caldwell and G. L. Honaker, Jr., 9371, Prime Curios!
Cf.
A029743 (with distinct digits),
A124674 (with distinct prime digits),
A155024 (with distinct nonprime digits but with 0),
A155045 (with distinct odd digits),
A323387 (with distinct square digits),
A323391 (with distinct nonprime digits),
A323578 (with distinct digits for which parity of digits alternates).
-
With[{w = Select[Range@ 10, GCD[#, 10] == 1 &]}, Select[FromDigits /@ Permutations[w, Length@ w], PrimeQ]] (* Michael De Vlieger, Feb 03 2019 *)
Select[FromDigits/@Flatten[Permutations/@Subsets[{1,3,7,9}],1],PrimeQ]//Union (* Harvey P. Dale, Apr 20 2025 *)
Showing 1-3 of 3 results.
Comments