[go: up one dir, main page]

login
A249953
Primes with distinct digits: a(n) is the least prime > a(n-1) such that a(n-1) and a(n) share just one digit.
2
13, 17, 19, 29, 59, 79, 89, 97, 107, 139, 157, 163, 179, 239, 241, 257, 263, 271, 283, 307, 349, 367, 389, 409, 421, 439, 457, 461, 479, 509, 521, 547, 563, 571, 593, 613, 647, 653, 691, 701, 739, 751, 769, 809, 821, 839, 857, 863, 937, 941, 953, 967, 983, 1049, 1237, 1409, 1523, 1607
OFFSET
1,1
COMMENTS
The last term is a(163) = 102437.
MATHEMATICA
a249953[n_Integer] := Module[{t = {1}, i},
Do[If[And[DuplicateFreeQ[IntegerDigits[Prime[i]]],
Length[Intersection[IntegerDigits[Last@t],
IntegerDigits[Prime[i]]]] == 1], True;
t = Append[t, Prime[i]]], {i, 1, n}]; Rest[t]]; a249953[120000] (* Michael De Vlieger, Dec 14 2014 *)
lp1d[n_]:=Module[{p=NextPrime[n]}, While[Length[Intersection[ IntegerDigits[ n], IntegerDigits[p]]]!=1||!DuplicateFreeQ[ IntegerDigits[ p]], p= NextPrime[ p]]; p]; NestList[lp1d, 13, 60] (* Harvey P. Dale, May 31 2019 *)
CROSSREFS
Subsequence of A029743.
Cf. A030284.
Sequence in context: A339912 A099184 A098095 * A180530 A059500 A104213
KEYWORD
nonn,base,fini,full
AUTHOR
Zak Seidov, Dec 05 2014
STATUS
approved