OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
PROG
(Haskell)
import Data.List (delete, intersect); import Data.Function (on)
a239664 n = a239664_list !! (n-1)
a239664_list = 1 : f 1 [2..] where
f v ws = g ws where
g (x:xs) = if gcd v x == 1 && ((intersect `on` show) v x == "")
then x : f x (delete x ws) else g xs
(PARI) {u=[]; a=1; for(n=1, 99, print1(a", "); u=setunion(u, [a]); while(#u>1&&u[2]==u[1]+1, u=u[^1]); for(k=u[1]+1, 9e9, setsearch(u, k)&&next; gcd(k, a)>1&&next; #setintersect(Set(digits(a)), Set(digits(k)))&&next; a=k; next(2))); a} \\ M. F. Hasler, Sep 17 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Mar 23 2014
STATUS
approved