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.

Showing 1-5 of 5 results.

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
    

A282324 Greater of twin primes congruent to 19 (mod 30).

Original entry on oeis.org

19, 109, 139, 199, 229, 349, 619, 829, 859, 1279, 1429, 1489, 1609, 1669, 1699, 1789, 1879, 1999, 2029, 2089, 2239, 2269, 2659, 2689, 3169, 3259, 3469, 3529, 3559, 3769, 3919, 4129, 4159, 4219, 4339, 4519, 4549, 4639, 4789, 4969, 5419, 5479, 5659, 5869, 6199
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [A282323 and this sequence] is A132242.
The union of [{5, 7}, A282322, this sequence and A282326] is the greater of twin primes sequence A006512.
The union of [{3, 5, 7}, A282321 to A282326] is the twin primes sequence A001097.
Number of terms less than 10^k, k=2,3,4,...: 1, 9, 64, 414, 2734, 19674, 146953, ... - Muniru A Asiru, Feb 09 2018

Crossrefs

Programs

  • GAP
    Filtered(List([1..220], k -> 30*k-11), n -> IsPrime(n) and IsPrime(n-2));  # Muniru A Asiru, Feb 02 2018
  • Magma
    [p: p in PrimesUpTo(7000) | IsPrime(p-2) and p mod 30 eq 19 ]; // Vincenzo Librandi, Feb 13 2017
    
  • Maple
    a:={}:
    for i from 1 to 1229 do
      if isprime(ithprime(i)-2) and ithprime(i) mod 30 = 19 then
        a:={op(a),ithprime(i)}:
      fi:
    od:
    a;
    # More efficient
    select(n -> isprime(n-2) and isprime(n), [seq(30*k+19, k=0..220)]); # Muniru A Asiru, Jan 30 2018
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[# - 2] && Mod[#, 30] == 19 &] (* Vincenzo Librandi, Feb 13 2017 *)
  • PARI
    list(lim)=my(v=List(), p=2); forprime(q=3, lim, if(q-p==2 && q%30==19, listput(v, q)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017
    

A076746 List giving pairs of primes of the form 10k+3 and 10k+7.

Original entry on oeis.org

3, 7, 13, 17, 43, 47, 103, 107, 163, 167, 193, 197, 223, 227, 313, 317, 463, 467, 613, 617, 643, 647, 673, 677, 823, 827, 853, 857, 883, 887, 1093, 1097, 1213, 1217, 1303, 1307, 1423, 1427, 1483, 1487, 1663, 1667, 1693, 1697, 1783, 1787, 1873, 1877, 1993
Offset: 1

Views

Author

Cino Hilliard, Nov 11 2002

Keywords

Comments

Except for 3 and 7, all pairs are 30k+13 and 30k+17.
Is this sequence infinite?

Examples

			43 and 47 are in the sequence because both are prime; 73 and 77 aren't because not both are primes.
		

Crossrefs

Programs

  • Magma
    &cat[[10*k+3, 10*k+7]: k in [0..250]| IsPrime(10*k+3) and IsPrime(10*k+7)]; // Vincenzo Librandi, Jun 17 2016
  • Mathematica
    a[0] = 3; a[n_] := a[n] = a[n - 1] + 10; Flatten[Table[If[PrimeQ[a[n]] && PrimeQ[a[n] + 4], {a[n],a[n] + 4}, {}], {n, 0, 1000}]] (* Roger L. Bagula, May 04 2008 *)
    Flatten[Select[Table[10n+{3,7},{n,0,200}],And@@PrimeQ[#]&]] (* Harvey P. Dale, Dec 31 2013 *)
  • PARI
    forstep(x=3,2000,10, if(isprime(x) && isprime(x+4), print1(x, ", ", x+4, ", ")))
    

Extensions

Edited by Don Reble, Jun 07 2003
More terms from Roger L. Bagula, May 04 2008

A138122 Cousin primes, the lower of which is 7 (mod 10).

Original entry on oeis.org

7, 11, 37, 41, 67, 71, 97, 101, 127, 131, 277, 281, 307, 311, 397, 401, 457, 461, 487, 491, 757, 761, 877, 881, 907, 911, 937, 941, 967, 971, 1087, 1091, 1297, 1301, 1447, 1451, 1567, 1571, 1597, 1601, 1867, 1871, 2137, 2141, 2347, 2351, 2377, 2381, 2437
Offset: 1

Views

Author

Roger L. Bagula, May 04 2008

Keywords

Comments

Start from the intersection of A023200 and A030432, then add the associated members of A046132. The last digits are obviously periodic as A010688. - R. J. Mathar, Nov 26 2008

Crossrefs

Programs

  • Mathematica
    a[0] = 7; a[n_] := a[n] = a[n - 1] + 10; Flatten[Table[If[PrimeQ[a[n]] && PrimeQ[a[n] + 4], {a[n],a[n] + 4}, {}], {n, 0, 1000}]]

Extensions

Replaced Mathematica definition by humanly readable phrase. - R. J. Mathar, Nov 26 2008

A331840 Numbers k such that 30*k-13, 30*k-11 are twin primes.

Original entry on oeis.org

1, 4, 5, 7, 8, 12, 21, 28, 29, 43, 48, 50, 54, 56, 57, 60, 63, 67, 68, 70, 75, 76, 89, 90, 106, 109, 116, 118, 119, 126, 131, 138, 139, 141, 145, 151, 152, 155, 160, 166, 181, 183, 189, 196, 207, 228, 232, 238, 244, 249, 250, 252, 259, 263, 270, 280, 285, 287
Offset: 1

Views

Author

Frank Ellermann, Feb 26 2020

Keywords

Comments

All twin primes > 7 have the form 30*k-{13,11}, or 30*k +-1 (A176114), or 30*k+{11,13} (A089160).
All twin primes > 7 with least significant decimal digit 7 have the form 30*k-13.
All twin primes > 7 with least significant decimal digit 3 have the form 30*k+13.

Examples

			1 is a term because 1*30 - 13 =  17 = prime(6)  and 1*30 - 11 =  19 = prime(7).
4 is a term because 4*30 - 13 = 107 = prime(28) and 4*30 - 11 = 109 = prime(29).
5 is a term because 5*30 - 13 = 137 = prime(33) and 5*30 - 11 = 139 = prime(34).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[300], And @@ PrimeQ[30*# - {11, 13}] &] (* Amiram Eldar, Feb 29 2020 *)
  • PARI
    isok(k) = isprime(30*k-13) && isprime(30*k-11); \\ Michel Marcus, Feb 29 2020
  • Rexx
    S = 1
    do N = 2 while length( S ) < 255
       if NOPRIME( N*30 -13 )  then  iterate N
       if NOPRIME( N*30 -11 )  then  iterate N
       S = S || ',' N
    end N
    say S
    

Formula

a(n) = A089161(n)+1.
Showing 1-5 of 5 results.