OFFSET
1,1
COMMENTS
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..10000
EXAMPLE
The pair of cousin prime (3,7) is not a member since 3 mod 10 = 3.
For p = 97, we get that (97,101) is a cousin prime pair and 97 == 7 (mod 10).
MAPLE
a:={}: for i from 1 to 1500 do if isprime(ithprime(i)+4) and ithprime(i) mod 10 = 7 then a:={op(a), ithprime(i)}: fi: od: a; # Muniru A Asiru, Aug 04 2017
MATHEMATICA
Select[10 Range[0, 660] + 7, PrimeQ[#] && PrimeQ[# + 4] &] (* Robert G. Wilson v, Dec 11 2017 *)
PROG
(GAP)
P:=Filtered([1..10000], IsPrime);;
P1:=List(Filtered(Filtered(List([1..Length(P)-1], n->[P[n], P[n+1]]), i->i[2]-i[1]=4), j->j[1] mod 5 =2), k->k[1]);
(PARI) isok(p) = isprime(p) && isprime(p+4) && ((p % 10) == 7); \\ Michel Marcus, Jul 03 2017
(PARI) is(n)=n%30==7 && isprime(n+4) && isprime(n) \\ Charles R Greathouse IV, Jul 13 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Muniru A Asiru, Jul 03 2017
STATUS
approved