A092631 Duplicate of A061371.
22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75, 77, 222, 225, 232, 235, 237, 252, 253, 255
Offset: 1
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.
a(1000) = 46999. a(10^4) = 809999. a(10^5) = 44499999. a(10^6) = 668999999.
FromDigits/@Tuples[{0,4,6,8,9},3] (* Harvey P. Dale, Aug 16 2018 *)
is(n) = #setintersect(vecsort(digits(n), , 8), [1, 2, 3, 5, 7])==0 \\ Felix Fröhlich, Sep 09 2019
89 is the smallest composite-digit prime and also the only composite-digit prime whose digits are distinct. - _Bernard Schott_, Jan 31 2019
Select[Prime@Range[6500], Intersection[IntegerDigits[ # ], {0, 1, 2, 3, 5, 7}] == {} & ] (* Ray Chandler, Mar 04 2007 *) With[{c = {4, 6, 8, 9}}, Array[Select[Map[FromDigits@ Append[#, 9] &, Tuples[c, {#}]], PrimeQ] &, 4]] // Flatten (* Michael De Vlieger, Feb 02 2019 *)
a(5) = 4049 is a prime and 4,0,9 are 0 or composite digits.
Select[FromDigits/@Tuples[{0,4,6,8,9},5],PrimeQ] (* Harvey P. Dale, May 04 2011 *)
25725 is a term as 25725 = 3 * 5^2 * 7^3, and both the number and its prime factors only contain prime digits.
Select[Select[Range[33000], CompositeQ], And[AllTrue[Union@ IntegerDigits[#], PrimeQ], AllTrue[Union@ Flatten@ Map[IntegerDigits, FactorInteger[#][[All, 1]] ], PrimeQ]] &] (* Michael De Vlieger, Aug 16 2025 *)
A:=3,5,7: B:= [A]: for d from 2 to 4 do B:= map(f,B); A:= A,op(B) od: remove(isprime,[A]); # Robert Israel, Jun 30 2025
Select[Range[1, 6000, 2], CompositeQ[#] && AllTrue[IntegerDigits[#], MemberQ[{3, 5, 7}, #1] &] &] (* Amiram Eldar, Jun 30 2025 *)
from sympy import isprime from itertools import count, islice, product def agen(): yield from (t for d in count(2) for p in product("357", repeat=d) if not isprime(t:=int("".join(p)))) print(list(islice(agen(), 53))) # Michael S. Branicky, Jun 30 2025
237 is included because it is composite and 2, 3, 7, 23 and 37 are all primes. 4 is included because it is composite and has no proper substrings.
from itertools import combinations from sympy import isprime for n in range(2, 1000): if not isprime(n): properSubstrings = set( int(str(n)[start:end]) for (start, end) in combinations(range(len(str(n)) + 1), 2) ) - set((n,)) if all(isprime(s) for s in properSubstrings): print(n, end=', ')
1371 is in the sequence since upon deleting any two digits we get 13, 71, 17, 31, 11 and 37, all of which are prime. 1313 is not in the sequence since upon deleting the two 1s we get 33, which is not prime.
q[n_] := Module[{d = IntegerDigits[n]}, AllTrue[FromDigits /@ Subsets[d, {Length[d] - 2}], PrimeQ]]; Select[Range[100, 1500], CompositeQ[#] && q[#] &] (* Amiram Eldar, Nov 26 2024 *)
from sympy import isprime from itertools import combinations as C def ok(n): if n < 100 or isprime(n): return False s = str(n) return all(isprime(int(t)) for i, j in C(range(len(s)), 2) if (t:=s[:i]+s[i+1:j]+s[j+1:])!="") print([k for k in range(1500) if ok(k)]) # Michael S. Branicky, Nov 26 2024
Comments