A243355 Numbers n such that n and prime(n) have no common digits.
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 28, 35, 36, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 57, 58, 59, 60, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 76, 77, 79, 85, 86, 87, 88, 89, 90, 91, 93, 96, 98, 99, 101
Offset: 1
Examples
98 is in the sequence because prime(98) = 521, which has no digits in common with 98.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
import Data.List (intersect) a243355 n = a243355_list !! (n-1) a243355_list = filter (\x -> null $ show x `intersect` (show $ a000040 x)) [1..] -- Reinhard Zumkeller, Sep 14 2014
-
Mathematica
Select[Range[110],Intersection[IntegerDigits[#],IntegerDigits[Prime[#]]]=={}&] (* Harvey P. Dale, Aug 11 2023 *)
-
PARI
s=[]; for(n=1, 300, if(setintersect(vecsort(digits(n),,8), vecsort(digits(prime(n)),,8))==[], s=concat(s, n))); s