(MAGMAMagma) [ p: p in PrimesUpTo(2000) | p mod 7 in {0, 5} ]; // Vincenzo Librandi, Aug 13 2012
(MAGMAMagma) [ p: p in PrimesUpTo(2000) | p mod 7 in {0, 5} ]; // Vincenzo Librandi, Aug 13 2012
editing
approved
approved
editing
editing
approved
Because 7 is the only prime congruent to 0 mod 7, it is more efficient to search only for primes that are congruent to 5 mod 7 and then insert 7 as the second term of the sequence (see the second Mathematica program below). - Harvey P. Dale, Jun 24 2017
Insert[Select[Prime[Range[500]], Mod[#, 7]==5&], 7, 2] (* Harvey P. Dale, Jun 24 2017 *)
approved
editing
proposed
approved
editing
proposed
Vincenzo Librandi, <a href="/A045447/b045447.txt">Table of n, a(n) for n = 1..1000</a>
Select[Prime[Range[200]], MemberQ[{0, 5}, Mod[#, 7]]&] (* Vincenzo Librandi, Aug 13 2012 *)
(MAGMA) [ p: p in PrimesUpTo(2000) | p mod 7 in {0, 5} ]; // Vincenzo Librandi, Aug 13 2012
Cf. A000040.
nonn,easy
approved
editing
_N. J. A. Sloane (njas(AT)research.att.com)_.
nonn,new
nonn
N. J. A. Sloane (njas(AT)research.att.com).