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”).
%I #21 Sep 08 2022 08:46:15
%S 2,107,211,317,421,631,947,1051,1367,1471,1787,1997,2207,2311,2417,
%T 2521,2731,2837,3257,3361,3467,3571,3677,4201,4517,4621,4831,4937,
%U 5147,5881,5987,6091,6197,6301,6827,7247,7351,7457,7561,7877,8087,8191,8297,8821,9137,9241,9661,9767,9871,10501
%N Primes p such that p (mod 3) = p (mod 5) = p (mod 7).
%C Or primes p such that p (mod 105) = {1, 2}.
%C In terms a(4227)...a(4246) their terminal digits alternate: 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7.
%H Harvey P. Dale, <a href="/A267550/b267550.txt">Table of n, a(n) for n = 1..1000</a>
%t Select[ Prime[ Range[10000]], (Mod[#,3] == Mod[#,5] == Mod[#,7]) &](*Or*)
%t Select[ Prime[ Range[10000]], 0 < Mod[#,105] < 3 &]
%t Select[Prime[Range[10000]],Length[Union[Mod[#,{3,5,7}]]]==1&] (* _Harvey P. Dale_, Oct 11 2019 *)
%o (Magma) [p: p in PrimesUpTo(10000) | p mod 3 eq p mod 5 and p mod 5 eq p mod 7]; // _Vincenzo Librandi_, Jan 17 2016
%o (PARI) lista(nn) = forprime(p=2, nn, if(p%3 == p%5 && p%5 == p%7, print1(p, ", "))); \\ _Altug Alkan_, Jan 25 2016
%Y Cf. A216145, A267540.
%K nonn,easy
%O 1,1
%A _Mikk Heidemaa_, Jan 17 2016
%E More terms from _Vincenzo Librandi_, Jan 17 2016