A192180 Composite numbers n such that all digits of n occur in its list of primes.
95, 132, 272, 312, 322, 326, 333, 731, 735, 912, 973, 995, 1111, 1212, 1255, 1292, 1972, 2112, 2132, 2232, 2272, 2512, 2672, 2737, 2994, 3171, 3192, 3210, 3212, 3243, 3315, 3393, 3792, 3933, 4172, 4341, 4371, 4383, 5150, 5192, 5271, 6973, 7132, 7210
Offset: 1
Examples
Since the prime factorization of 95 is (5, 19), and both 9 and 5 occur in (5, 19), the number 95 is on the list. Since the prime factorization of 1255 is (5, 251), and 1, 2, and both 5s occur in (5, 251), the number 1255 is on the list. 22 is not on the list because its prime factorization is (2, 11) and that does not have enough 2s. Nor is 25 on the list because for this sequence we express its factorization as (5, 5) rather than (5^2).
Links
- Klaus Brockhaus, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A037276.
Programs
-
Magma
S:=[]; for n in [1..10000] do if not IsPrime(n) then u:=Intseq(n); f:=Factorization(n); v:=&cat[ [ f[j, 1]: i in [1..f[j, 2]] ]: j in [1..#f] ]; w:=&cat[ Intseq(p): p in v ]; if forall{ a: a in [0..9] | Multiplicity(SequenceToMultiset(u), a) le Multiplicity(SequenceToMultiset(w), a) } then Append(~S, n); end if; end if; end for; S; // Klaus Brockhaus, Jul 09 2011
-
Mathematica
Select[Range[2, 5000], Not[PrimeQ[#]] && Sort[DigitCount[FromDigits[Flatten[IntegerDigits/@Flatten[Table[#1, {#2}]&@@@FactorInteger[#]]]]] - DigitCount[#]][[1]] >= 0 &] (* Alonso del Arte, Jun 28 2011, based on HomePrimeStep function by Eric W. Weisstein *)
Comments