OFFSET
1,1
COMMENTS
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
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ n log n. - Charles R Greathouse IV, Jul 19 2011
For n>=29, A(107800+i)(n) = A(107800+j)(n), 1 <= i < j <= 14. - Vladimir Shevelev, Mar 18 2012
MATHEMATICA
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
PROG
(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)
in(v, x)=for(i=1, #v, if(v[i]==x, return(1))); 0
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; }
\\ Charles R Greathouse IV, Jul 20 2011
(Haskell)
import Data.List (intersect, delete)
a107801 n = a107801_list !! (n-1)
a107801_list = 2 : f 2 (tail a000040_list) where
f x ps = g ps where
g (q:qs) | null (show x `intersect` show q) = g qs
| otherwise = q : f q (delete q ps)
-- Reinhard Zumkeller, Mar 31 2012
CROSSREFS
Cf. A107353.
KEYWORD
nonn,base
AUTHOR
Zak Seidov & Eric Angelini, May 24 2005
STATUS
approved