A325934 Primes consisting of a single 1 and at least one copy of some other digit.
13, 17, 19, 31, 41, 61, 71, 199, 313, 331, 661, 881, 919, 991, 1777, 1999, 2221, 3313, 3331, 4441, 6661, 7177, 7717, 9199, 31333, 33331, 71777, 99991, 199999, 313333, 331333, 333331, 991999, 999199, 3331333, 3333133, 3333313, 3333331, 9999991, 19999999
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Select[Flatten[Table[FromDigits/@Permutations[PadRight[{1},n,k]],{n,10},{k,Range[2,9]}]],PrimeQ]//Union Module[{nn=10,c1,c2},c1=Select[Table[FromDigits[PadLeft[{1},n,k]],{k,{2,4,5,6,8}},{n,2,nn}]//Flatten,PrimeQ];c2=Select[FromDigits/@ Flatten[ Permutations/@Flatten[Table[PadLeft[{1},n,k],{k,{3,7,9}},{n,2,nn}],1],1],PrimeQ];Sort[Flatten[Join[{c1,c2}]]]] (* Harvey P. Dale, Sep 20 2019 *)
-
PARI
lista(nn) = {forprime(p=1, nn, my(d = digits(p)); if ((#Set(d) == 2) && (#select(x->(x==1), d) == 1), print1(p, ", ")););} \\ Michel Marcus, Sep 11 2019
Comments