# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a107801 Showing 1-1 of 1 %I A107801 #29 Apr 11 2020 05:46:48 %S A107801 2,23,3,13,11,17,7,37,31,19,29,59,5,53,43,41,47,67,61,71,73,79,89,83, %T A107801 103,101,107,97,109,113,127,131,137,139,149,151,157,163,167,173,179, %U A107801 181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277 %N A107801 a(1) = prime(1), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1). %C A107801 a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. If it exists, N > 10^1000. - _Charles R Greathouse IV_, Jul 19 2011 %H A107801 Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 %F A107801 a(n) ~ n log n. - _Charles R Greathouse IV_, Jul 19 2011 %F A107801 For n>=29, A(107800+i)(n) = A(107800+j)(n), 1 <= i < j <= 14. - _Vladimir Shevelev_, Mar 18 2012 %t A107801 p=Prime[1];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b %o A107801 (PARI) common(a,b)=a=vecsort(eval(Vec(Str(a))),,8);b=vecsort(eval(Vec(Str(b))),,8);#a+#b>#vecsort(concat(a,b),,8) %o A107801 in(v,x)=for(i=1,#v,if(v[i]==x,return(1)));0 %o A107801 lista(nn) = {my(v=[2]); for(n=2, nn, forprime(p=2, default(primelimit), if(!in(v,p)&&common(v[#v],p), v=concat(v,p); break))); v; } %o A107801 \\ _Charles R Greathouse IV_, Jul 20 2011 %o A107801 (Haskell) %o A107801 import Data.List (intersect, delete) %o A107801 a107801 n = a107801_list !! (n-1) %o A107801 a107801_list = 2 : f 2 (tail a000040_list) where %o A107801 f x ps = g ps where %o A107801 g (q:qs) | null (show x `intersect` show q) = g qs %o A107801 | otherwise = q : f q (delete q ps) %o A107801 -- _Reinhard Zumkeller_, Mar 31 2012 %Y A107801 Cf. A107353. %Y A107801 Other cases of seed: A107802 (a(1) = 3), A107803 (a(1) = 5), A107804 (a(1) = 7), A107805 (a(1) = 11), A107806 (a(1) = 13), A107807 (a(1) = 17), A107808 (a(1) = 19), A107809 (a(1) = 23), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41), A107814 (a(1) = 43). %K A107801 nonn,base %O A107801 1,1 %A A107801 _Zak Seidov_ & _Eric Angelini_, May 24 2005 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE