cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Dec 05 2014

Keywords

Comments

The last term is a(163) = 102437.

Crossrefs

Subsequence of A029743.
Cf. A030284.

Programs

  • 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 *)