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-10 of 17 results. Next

A060256 Smallest multiple a(n) of n-th primorial q(n) such that a(n)*q(n)-1 and a(n)*q(n)+1 are a pair of twin primes.

Original entry on oeis.org

2, 1, 1, 2, 1, 6, 8, 11, 4, 16, 22, 4, 74, 24, 37, 28, 14, 11, 242, 11, 91, 20, 83, 91, 35, 80, 48, 47, 226, 2, 12, 203, 30, 38, 356, 54, 266, 108, 305, 227, 173, 1185, 738, 13, 382, 277, 455, 433, 173, 1303, 926, 1162, 164, 298, 69, 121, 702, 1670, 36, 570, 170, 204
Offset: 1

Views

Author

Labos Elemer, Mar 22 2001

Keywords

Examples

			30030*j-1 or 30030*j+1 are not both primes for j=1,2,3,4,5. But for j=6 {180179,180181} are twin primes. So a(6)=6.
		

Crossrefs

Programs

  • Mathematica
    smp[n_]:=Module[{k=1},While[!PrimeQ[k*n+1]||!PrimeQ[k*n-1],k++];k]; Table[ smp[n],{n,FoldList[Times,Prime[Range[70]]]}] (* Harvey P. Dale, Oct 27 2016 *)
  • PARI
    a(n)=p=vecprod(primes(n));for(k=1,+oo,ispseudoprime(k*p+1)&&ispseudoprime(k*p-1)&&return(k)) \\ Jeppe Stig Nielsen, Nov 09 2024

Extensions

Corrected and extended by Ray Chandler, Apr 03 2009

A158277 The lesser of twin prime pairs with each prime in a different century.

Original entry on oeis.org

599, 2999, 3299, 4799, 5099, 6299, 8999, 10499, 11699, 21599, 25799, 26699, 29399, 33599, 34499, 36899, 37199, 42899, 44699, 47699, 49199, 56099, 57899, 60899, 63599, 65099, 65699, 70199, 74099, 81899, 83399, 85199, 88799, 92399, 97499, 100799, 101999, 102299
Offset: 1

Views

Author

Ki Punches, Mar 15 2009

Keywords

Comments

The sequence is conjecturally infinite; note that those ending in 999 straddle millenia: A158861.
Since any prime greater than 3 is congruent to 1 or 5 modulo 6, a(n)+1 is divisible by 300 (see A001359). - Hartmut F. W. Hoft, May 18 2017

Crossrefs

Programs

  • Mathematica
    Select[Range[100,110000,100],AllTrue[#+{1,-1},PrimeQ]&]-1 (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 21 2016 *)
    a158277[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[100, n, 100]], First[#]-Last[#]==2&]]
    a158277[105000] (* data *) (* Hartmut F. W. Hoft, May 18 2017 *)

Extensions

Corrected by Ray Chandler and R. J. Mathar, Apr 03 2009

A282321 Lesser of twin primes congruent to 11 (mod 30).

Original entry on oeis.org

11, 41, 71, 101, 191, 281, 311, 431, 461, 521, 641, 821, 881, 1031, 1061, 1091, 1151, 1301, 1451, 1481, 1721, 1871, 1931, 2081, 2111, 2141, 2381, 2591, 2711, 2801, 3251, 3371, 3461, 3581, 3671, 3821, 3851, 4001, 4091, 4241, 4271, 4421, 4481, 4721, 4931, 5021
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [this sequence and A282322] is A132241.
The union of [{3, 5}, this sequence, A282323 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.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(5000) | IsPrime(p+2) and p mod 30 eq 11 ]; // Vincenzo Librandi, Feb 12 2017
    
  • Maple
    a:={}:
    for i from 1 to 1229 do
      if isprime(ithprime(i)+2) and ithprime(i) mod 30 = 11 then
        a:={op(a),ithprime(i)}:
      fi:
    od:
    a;
  • PARI
    list(lim)=my(v=List(), p=2); forprime(q=3, lim+2, if(q-p==2 && q%30==13, listput(v, p)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017

A158861 The lesser of twin prime pairs with each prime in a different millennia.

Original entry on oeis.org

2999, 8999, 101999, 164999, 179999, 230999, 272999, 293999, 326999, 389999, 410999, 419999, 443999, 512999, 524999, 536999, 659999, 662999, 773999, 788999, 794999, 800999, 818999, 890999, 920999, 932999, 989999, 1028999, 1058999, 1136999, 1187999, 1238999
Offset: 1

Views

Author

Ki Punches, Mar 28 2009

Keywords

Comments

The sequence is conjecturally infinite; note that terms ending 9999 straddle ten millennia.

Crossrefs

Extensions

Corrected and extended by Ray Chandler and R. J. Mathar, Apr 03 2009

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
    

A282326 Greater of twin primes congruent to 1 (mod 30).

Original entry on oeis.org

31, 61, 151, 181, 241, 271, 421, 571, 601, 661, 811, 1021, 1051, 1231, 1291, 1321, 1621, 1951, 2131, 2311, 2341, 2551, 2731, 2791, 2971, 3001, 3121, 3301, 3331, 3361, 3391, 3541, 3931, 4021, 4051, 4231, 4261, 4651, 4801, 5011, 5101, 5281, 5521, 5641, 5851
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [A060229 and this sequence] is A132243.
The union of [{5, 7}, A282322, A282324 and this sequence] is the greater of twin primes sequence A006512.
The union of [{3, 5, 7}, A282321 to A060229 and this sequence] is the twin primes sequence A001097.
Number of terms less than 10^k, k=2,3,4,...: 2, 11, 72, 407, 2697, 19507, 146516, ... - Muniru A Asiru, Mar 05 2018

Crossrefs

Programs

  • GAP
    Filtered(List([0..300], k -> 30*k+1), n -> IsPrime(n-2) and IsPrime(n));  # Muniru A Asiru, Mar 05 2018
  • Maple
    select(n -> isprime(n-2) and isprime(n), [seq(30*k+1, k=0..300)]); # Muniru A Asiru, Mar 05 2018
  • Mathematica
    1 + Select[30 Range@ 200, AllTrue[# + {-1, 1}, PrimeQ] &] (* Michael De Vlieger, Mar 26 2018 *)
  • PARI
    list(lim)=my(v=List(),p=2); forprime(q=3,lim, if(q-p==2 && q%30==1, listput(v,q)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017
    

A060230 Smaller of twin primes whose middle term is a multiple of A002110(4)=210.

Original entry on oeis.org

419, 1049, 2309, 2729, 3359, 5879, 6089, 6299, 7349, 7559, 8819, 9239, 10499, 10709, 11549, 11969, 15329, 18059, 21839, 25409, 26249, 26879, 28349, 29399, 30869, 31079, 32969, 33179, 33599, 33809, 34649, 35279, 37589, 40529, 42839
Offset: 1

Views

Author

Labos Elemer, Mar 21 2001

Keywords

Comments

Number of terms less than 10^k: 0, 0, 0, 1, 12, 80, 542, 3908, 29229, ... - Muniru A Asiru, Jan 29 2018

Examples

			For the pair {1049,1051} (1049+1051)/2 = 5*210.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..10^7], 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]+j[2]) mod 210 = 0), k -> k[1]); # Muniru A Asiru, Jan 29 2018
    
  • Maple
    select(n->isprime(n) and isprime(n+2), [seq(210*k - 1, k=1..10^3)]); # Muniru A Asiru, Jan 29 2018
  • Mathematica
    Select[210*Range[250],And@@PrimeQ[#+{1,-1}]&]-1 (* Harvey P. Dale, Aug 25 2013 *)
  • PARI
    is(n)=(n+1)%210==0 && isprime(n+2) && isprime(n) \\ Charles R Greathouse IV, Jan 29 2018

Extensions

Minor edits by Ray Chandler, Apr 02 2009

A060231 Smaller of twin primes whose middle term is a multiple of A002110(5)=2310.

Original entry on oeis.org

2309, 9239, 11549, 25409, 34649, 43889, 55439, 78539, 92399, 110879, 117809, 133979, 152459, 168629, 180179, 224069, 226379, 230999, 244859, 251789, 267959, 270269, 284129, 297989, 300299, 309539, 314159, 316469, 330329, 376529, 390389
Offset: 1

Views

Author

Labos Elemer, Mar 21 2001

Keywords

Comments

Number of terms less than 10^k: 0, 0, 0, 0, 2, 9, 66, 422, 3255, ... - Muniru A Asiru, Jan 29 2018

Examples

			For the pair {9239,9241} (9239+9241)/2 = 4*2310.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..10^5], 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]+j[2]) mod 2310 = 0), k -> k[1]); # Muniru A Asiru, Jan 29 2018
    
  • Maple
    select(n->isprime(n) and isprime(n+2), [seq(2310*k-1, k=1..10^3)]);  # Muniru A Asiru, Jan 29 2018
  • Mathematica
    Select[2310*Range[200],And@@PrimeQ[#+{1,-1}]&]-1 (* Harvey P. Dale, Aug 23 2013 *)
  • PARI
    is(n)=(n+1)%2310==0 && isprime(n+2) && isprime(n) \\ Charles R Greathouse IV, Jan 30 2018

Extensions

Minor edits by Ray Chandler, Apr 02 2009

A181606 Twin primes ending in 9.

Original entry on oeis.org

19, 29, 59, 109, 139, 149, 179, 199, 229, 239, 269, 349, 419, 569, 599, 619, 659, 809, 829, 859, 1019, 1049, 1229, 1279, 1289, 1319, 1429, 1489, 1609, 1619, 1669, 1699, 1789, 1879, 1949, 1999, 2029, 2089, 2129, 2239, 2269, 2309, 2339, 2549, 2659, 2689
Offset: 1

Views

Author

Omar E. Pol, Nov 01 2010

Keywords

Crossrefs

Programs

  • Maple
    filter:= proc(n)
      if not isprime(n) then return false fi;
      if n mod 3 = 1 then isprime(n-2) else isprime(n+2) fi
    end proc:
    select(filter, [seq(i,i=9..10^4,10)]); # Robert Israel, Nov 19 2023
  • Mathematica
    Select[Prime@ Range@ 800, Mod[ #, 10] == 9 && (PrimeQ[ # - 2] || PrimeQ[ # + 2]) &] (* Robert G. Wilson v, Nov 06 2010 *)
    Select[Union[Flatten[Select[Partition[Prime[Range[400]],2,1],#[[2]]-#[[1]]==2&]]],Mod[#,10]==9&] (* Harvey P. Dale, May 21 2024 *)

Extensions

More terms from Robert G. Wilson v, Nov 06 2010
Showing 1-10 of 17 results. Next