OFFSET
1,1
COMMENTS
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
For p = 193, the pair of cousin primes is (193, 197) and 193 == 3 (mod 10).
Although, the primes 3 and 7 are not consecutive primes, p = 3 yields the pair of cousin primes (3, 7) and 3 == 3 (mod 10).
MAPLE
A289413:={}: for i from 1 to 1500 do if isprime(ithprime(i) + 4) and ithprime(i) mod 10 = 3 then A289413:={op(A289413), ithprime(i)}: fi: od: A289413;
# Alternative:
select(t -> isprime(t) and isprime(t+4), [seq(i, i=3..10000, 10)]); # Robert Israel, Aug 02 2017
MATHEMATICA
Select[Prime[Range[800]], Mod[#, 10]==3&&PrimeQ[#+4]&] (* Harvey P. Dale, Aug 22 2019 *)
PROG
(GAP)
P:=Filtered([1..10000], IsPrime);;
P1:=Concatenation([3], List(Filtered(Filtered(List([1..Length(P)-1], n->[P[n], P[n+1]]), i->i[2]-i[1]=4), j->j[1] mod 10 = 3), k->k[1]));
(PARI) isok(p) = isprime(p) && isprime(p+4) && (p%10==3); \\ Michel Marcus, Jul 19 2017
(PARI) list(lim)=my(v=List([3]), p=13); forprime(q=17, lim+4, if(q-p==4 && p%10==3, listput(v, p)); p=q); Vec(v) \\ Charles R Greathouse IV, Aug 03 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Muniru A Asiru, Jul 06 2017
STATUS
approved