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.

A108382 Primes p such that p's set of distinct digits is {1,3,7}.

Original entry on oeis.org

137, 173, 317, 1373, 1733, 3137, 3371, 7331, 11173, 11317, 11731, 13171, 13177, 13337, 13711, 17137, 17317, 17333, 17377, 17713, 17737, 31177, 31337, 31771, 33317, 33713, 37117, 37171, 37313, 37717, 71317, 71333, 71713, 73133, 73331
Offset: 1

Views

Author

Rick L. Shepherd, Jun 01 2005

Keywords

Crossrefs

Cf. A108383 ({1, 3, 9}), A108384 ({1, 7, 9}), A108385 ({3, 7, 9}), A108386 ({1, 3, 7, 9}), A030096 (Primes whose digits are all odd).

Programs

  • Maple
    S1[1] := {1}: S3[1]:= {3}: S7[1]:= {7}:
    S13[1]:= {}: S17[1]:= {}: S37[1]:={}:
    S137[1]:= {}:
    for n from 2 to 5 do
      S1[n]:= map(t -> 10*t+1, S1[n-1]);
      S3[n]:= map(t -> 10*t+3, S3[n-1]);
      S7[n]:= map(t -> 10*t+7, S7[n-1]);
      S13[n]:= map(t -> 10*t+1, S13[n-1] union S3[n-1]) union
               map(t -> 10*t+3, S13[n-1] union S1[n-1]);
      S17[n]:= map(t -> 10*t+1, S17[n-1] union S7[n-1]) union
               map(t -> 10*t+7, S17[n-1] union S1[n-1]);
      S37[n]:= map(t -> 10*t+3, S37[n-1] union S7[n-1]) union
               map(t -> 10*t+7, S37[n-1] union S3[n-1]);
      S137[n]:= map(t -> 10*t+1, S137[n-1] union S37[n-1]) union
                map(t -> 10*t+3, S137[n-1] union S17[n-1]) union
                map(t -> 10*t+7, S137[n-1] union S13[n-1]);
    od:
    sort(convert(`union`(seq(select(isprime,S137[n]),n=3..5)),list)); # Robert Israel, Jan 16 2019
  • Mathematica
    Select[Prime[Range[7300]],Union[IntegerDigits[#]]=={1,3,7}&] (* Harvey P. Dale, Jun 11 2013 *)