login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #25 May 31 2019 13:48:26

%S 13,17,19,29,59,79,89,97,107,139,157,163,179,239,241,257,263,271,283,

%T 307,349,367,389,409,421,439,457,461,479,509,521,547,563,571,593,613,

%U 647,653,691,701,739,751,769,809,821,839,857,863,937,941,953,967,983,1049,1237,1409,1523,1607

%N 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.

%C The last term is a(163) = 102437.

%H Zak Seidov, <a href="/A249953/b249953.txt">Table of n, a(n) for n = 1..163</a>

%t a249953[n_Integer] := Module[{t = {1}, i},

%t Do[If[And[DuplicateFreeQ[IntegerDigits[Prime[i]]],

%t Length[Intersection[IntegerDigits[Last@t],

%t IntegerDigits[Prime[i]]]] == 1], True;

%t t = Append[t, Prime[i]]], {i, 1, n}]; Rest[t]]; a249953[120000] (* _Michael De Vlieger_, Dec 14 2014 *)

%t 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 *)

%Y Subsequence of A029743.

%Y Cf. A030284.

%K nonn,base,fini,full

%O 1,1

%A _Zak Seidov_, Dec 05 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)