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.

A216145 Primes p such that p (mod 5) = p (mod 7).

Original entry on oeis.org

2, 3, 37, 71, 73, 107, 109, 179, 211, 281, 283, 317, 353, 389, 421, 457, 491, 563, 599, 631, 701, 739, 773, 809, 877, 911, 947, 983, 1019, 1051, 1087, 1123, 1193, 1229, 1297, 1367, 1439, 1471, 1543, 1579, 1613, 1753, 1787, 1789, 1823, 1997, 1999, 2069, 2137
Offset: 1

Views

Author

Zak Seidov, Sep 02 2012

Keywords

Comments

Or primes p such that p (mod 35) = {1, 2, 3, 4}.
In general if 0 < m (mod p) = m (mod q) then m (mod p*q) < p (with p < q any primes).

Examples

			37 = 2 (mod 5) = 2 (mod 7);
71 = 1 (mod 5) = 1 (mod 7);
73 = 3 (mod 5) = 3 (mod 7);
109 = 4 (mod 5) = 4 (mod 7).
		

Programs

  • Magma
    [p: p in PrimesUpTo(2500) | p mod 5 eq p mod 7]; // Vincenzo Librandi, Jan 17 2016
    
  • Maple
    select(isprime, [seq(seq(35*i+j,j=1..4),i=0..1000)]); # Robert Israel, Jan 18 2016
  • Mathematica
    Select[Prime[Range[100]],Mod[#,5]==Mod[#,7]&]
    Select[Prime[Range[100]],Mod[#,35]<5&]
  • PARI
    isok(n) = isprime(n) && ((n % 5) == (n % 7)); \\ Michel Marcus, Jan 17 2016
    
  • PARI
    lista(nn) = forprime(p=2, nn, if(p%5 == p%7, print1(p, ", "))); \\ Altug Alkan, Jan 18 2016