OFFSET
1,1
COMMENTS
The union of [{3, 5}, A282321, this sequence and A060229] is the lesser of twin primes sequence A001359.
A181605 without the 7. The proof works along the same lines as the proof in A282322. - R. J. Mathar, Feb 14 2017
Number of terms < 10^k: 0, 0, 1, 9, 64, 414, 2734, 19674, 146953, ... - Muniru A Asiru, Jan 09 2018
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..3000
EXAMPLE
From Muniru A Asiru, Jan 25 2018: (Start)
17 is a member because the pair (17, 19) is a twin prime, 17 < 19 and 17 mod 30 = 17.
137 is a member because the pair (137, 139) is a twin prime, 137 < 139 and 137 mod 30 = 17.
197 is a member because the pair (197, 199) is a twin prime, 197 < 199 and 197 mod 30 = 17.
(End)
MAPLE
a:={}:
for i from 1 to 1229 do
if isprime(ithprime(i)+2) and ithprime(i) mod 30 = 17 then
a:={op(a), ithprime(i)}:
fi:
od:
a;
MATHEMATICA
Select[17 + 30 Range[0, 220], PrimeQ[#] && PrimeQ[# + 2] &] (* Robert G. Wilson v, Jan 09 2018 *)
Select[Partition[Prime[Range[1000]], 2, 1], #[[2]]-#[[1]]==2&&Mod[#[[1]], 30]==17&][[;; , 1]] (* or *) Select[Range[17, 7000, 30], AllTrue[#+{0, 2}, PrimeQ]&] (* Harvey P. Dale, Mar 02 2024 *)
PROG
(Magma) [p: p in PrimesUpTo(7000) | IsPrime(p+2) and p mod 30 eq 17 ]; // Vincenzo Librandi, Feb 13 2017
(PARI) list(lim)=my(v=List(), p=2); forprime(q=3, lim+2, if(q-p==2 && q%30==19, listput(v, p)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017
(GAP)
P:=Filtered([1..400000], IsPrime);;
P1:=List(Filtered(Filtered(List([1..Length(P)-1], n->[P[n], P[n+1]]), i->i[2]-i[1]=2), j->j[1] mod 30=17), k->k[1]);; # Muniru A Asiru, Jul 08 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Martin Renner, Feb 11 2017
STATUS
approved