A257483 Primes p such that (p mod 8) = (p mod 27).
2, 3, 5, 7, 223, 433, 439, 653, 1087, 1297, 1301, 1303, 1733, 1949, 1951, 2161, 2377, 2381, 2383, 2593, 3457, 3461, 3463, 3673, 3677, 3889, 4111, 4327, 4759, 4969, 4973, 5189, 5407, 5623, 5839, 6053, 6269, 6271, 6481, 6701, 6703, 6917, 7129, 7349, 7351, 7561
Offset: 1
Examples
223 == 7 (mod 8) == 7 (mod 27), 433 == 1 (mod 8) == 1 (mod 27).
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[p: p in PrimesUpTo(8000) | p mod 8 eq p mod 27]; // Vincenzo Librandi, Apr 28 2015
-
Maple
select(isprime,[2,3,seq(seq(216*k+r,r=[1,5,7]),k=0..1000)]); # Robert Israel, May 26 2015
-
Mathematica
Select[Prime@ Range@ 1000, Mod[#, 8] == Mod[#, 27] &] (* Michael De Vlieger, Apr 27 2015 *)
-
PARI
is(n)=my(k=n%216); (k==1||k==5||k==7) && isprime(n) \\ Charles R Greathouse IV, May 26 2015
Formula
a(n) ~ 24n log n. - Charles R Greathouse IV, May 26 2015
Comments