[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A257668
Primes containing a digit 7.
6
7, 17, 37, 47, 67, 71, 73, 79, 97, 107, 127, 137, 157, 167, 173, 179, 197, 227, 257, 271, 277, 307, 317, 337, 347, 367, 373, 379, 397, 457, 467, 479, 487, 547, 557, 571, 577, 587, 607, 617, 647, 673, 677, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761
OFFSET
1,1
COMMENTS
Primes in A062675.
Subsequence of primes of A011537. - Michel Marcus, May 03 2015
FORMULA
a(n) ~ n log n. - Charles R Greathouse IV, Nov 01 2022
EXAMPLE
For n = 2, a(2) = 17 is the second prime containing a digit of 7.
MATHEMATICA
Select[Prime[Range[150]], ! StringFreeQ[ToString[#], "7"] &]
PROG
(Magma) [p: p in PrimesUpTo(800) | 7 in Intseq(p)];
(Sage) [p for p in primes(800) if 7 in p.digits(base=10)] # Bruno Berselli, May 03 2015
(PARI) lista(nn) = forprime(p=2, nn, if(vecsearch(vecsort(digits(p)), 7), print1(p, ", "))); \\ Altug Alkan, Apr 21 2016; corrected by Michel Marcus, Oct 30 2023
CROSSREFS
Cf. similar sequences listed in A257667.
Cf. A011537, A062675, A166579 (subsequence).
Sequence in context: A339527 A090652 A062675 * A106095 A153319 A030432
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, May 03 2015
STATUS
approved