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.

A282323 Lesser of twin primes congruent to 17 (mod 30).

Original entry on oeis.org

17, 107, 137, 197, 227, 347, 617, 827, 857, 1277, 1427, 1487, 1607, 1667, 1697, 1787, 1877, 1997, 2027, 2087, 2237, 2267, 2657, 2687, 3167, 3257, 3467, 3527, 3557, 3767, 3917, 4127, 4157, 4217, 4337, 4517, 4547, 4637, 4787, 4967, 5417, 5477, 5657, 5867, 6197
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [this sequence and A282324] is A132242.
The union of [{3, 5}, A282321, this sequence and A060229] is the lesser of twin primes sequence A001359.
The union of [{3, 5, 7}, A282321 to A282326] is the twin primes sequence A001097.
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

Examples

			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)
		

Crossrefs

Programs

  • 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
  • Magma
    [p: p in PrimesUpTo(7000) | IsPrime(p+2) and p mod 30 eq 17 ]; // Vincenzo Librandi, Feb 13 2017
    
  • 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 *)
  • 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