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.

A005382 Primes p such that 2p-1 is also prime.

Original entry on oeis.org

2, 3, 7, 19, 31, 37, 79, 97, 139, 157, 199, 211, 229, 271, 307, 331, 337, 367, 379, 439, 499, 547, 577, 601, 607, 619, 661, 691, 727, 811, 829, 877, 937, 967, 997, 1009, 1069, 1171, 1237, 1279, 1297, 1399, 1429, 1459, 1531, 1609, 1627, 1657, 1759, 1867, 2011
Offset: 1

Views

Author

Keywords

Comments

Sequence gives values of p such Sum_{i=1..p} gcd(p,i) = A018804(p) is prime. - Benoit Cloitre, Jan 25 2002
Let q = 2n-1. For these n (and q), the sum of two cyclotomic polynomials can be written as a product of cyclotomic polynomials and as a cyclotomic polynomial in x^2: Phi(q,x) + Phi(2q,x) = 2 Phi(n,x) Phi(2n,x) = 2 Phi(n,x^2). - T. D. Noe, Nov 04 2003
Primes in A006254. - Zak Seidov, Mar 26 2013
If a(n) is in A168421 then A005383(n) is a twin prime with a Ramanujan prime, A005383(n) - 2. If this sequence has an infinite number of terms in A168421, then the twin prime conjecture can be proved. - John W. Nicholson, Dec 05 2013
Records subsequence of A023509 (n >= 2). - David James Sycamore, May 05 2025

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A010051, A000040, A053685 (subsequence), A006254.
Cf. A023509.

Programs

  • Haskell
    a005382 n = a005382_list !! (n-1)
    a005382_list = filter
       ((== 1) . a010051 . (subtract 1) . (* 2)) a000040_list
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Magma
    [n: n in [0..1000] | IsPrime(n) and IsPrime(2*n-1)]; // Vincenzo Librandi, Nov 18 2010
    
  • Maple
    f := proc(Q) local t1,i,j; t1 := []; for i from 1 to 500 do j := ithprime(i); if isprime(2*j-Q) then t1 := [op(t1),j]; fi; od: t1; end; f(1);
    # second Maple program:
    q:= p-> andmap(isprime, [p, 2*p-1]):
    select(q, [$2..2500])[];  # Alois P. Heinz, Dec 16 2024
  • Mathematica
    Select[Prime[Range[300]], PrimeQ[2#-1]&]
  • PARI
    select(p->isprime(2*p-1),primes(500)) \\ Charles R Greathouse IV, Apr 26 2012
    
  • PARI
    forprime(n=2, 10^3, if(ispseudoprime(2*n-1), print1(n, ", "))) \\ Felix Fröhlich, Jun 15 2014

Formula

a(n) = A129521(n) / A005383(n). - Reinhard Zumkeller, Apr 19 2007
a(n) = (A005383(n) + 1)/2. - Zak Seidov, Nov 04 2010

A145471 Primes p such that (5+p)/2 is prime.

Original entry on oeis.org

5, 17, 29, 41, 53, 89, 101, 113, 137, 173, 197, 257, 269, 293, 353, 389, 449, 461, 509, 521, 557, 617, 701, 761, 773, 797, 857, 881, 929, 953, 977, 1013, 1109, 1181, 1193, 1229, 1277, 1289, 1301, 1361, 1433, 1481, 1613, 1637, 1709, 1721, 1877, 1889, 1901
Offset: 1

Views

Author

Artur Jasinski, Oct 11 2008

Keywords

Comments

All these primes are congruent to 1 mod 4 and to 5 mod 12.

Crossrefs

Subsequence of A040117. - Zak Seidov, Feb 21 2016

Programs

  • Magma
    [p: p in PrimesInInterval(3,2000) | IsPrime((5+p) div 2)]; // Vincenzo Librandi, Feb 25 2016
  • Maple
    select(t -> isprime(t) and isprime((t+5)/2), [seq(i, i=5..1000, 12)]); # Robert Israel, Feb 24 2016
  • Mathematica
    aa = {}; k = 5; Do[If[PrimeQ[(k + Prime[n])/2], AppendTo[aa, Prime[n]]], {n, 1, 500}];aa
    Select[Prime[Range[500]],PrimeQ[(5+#)/2]&]  (* Harvey P. Dale, Apr 23 2011 *)
  • PARI
    forprime(p=2,1e4,if(p%12!=5,next);if(isprime(p\2+3),print1(p", "))) \\ Charles R Greathouse IV, Jul 16 2011
    

Formula

a(n) = 2*A063909(n)-5. - Robert Israel, Feb 24 2016

A230138 List of those primes p with p + 2 and 2*p - 5 both prime.

Original entry on oeis.org

5, 11, 17, 29, 59, 71, 101, 137, 149, 179, 197, 227, 281, 311, 431, 599, 617, 641, 809, 821, 857, 1151, 1277, 1319, 1451, 1481, 1487, 1607, 1667, 1697, 1997, 2027, 2081, 2111, 2129, 2339, 2657, 2711, 2789, 3167, 3329, 3371, 3461, 3557, 3767, 3917, 3929, 4049, 4217, 4259
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 10 2013

Keywords

Comments

Clearly, all terms are congruent to 5 modulo 6, and not congruent to 3 modulo 5. Primes in this sequence are sparser than twin primes and Sophie Germain primes.
This sequence is interesting because of the conjectures in the comments in A230140 and A230141.
Intersection of A001359 and A089253 (or A063909). - M. F. Hasler, Oct 10 2013

Examples

			a(1) = 5 since neither 2 + 2 nor 2*3 - 5 is prime, but 5 + 2 = 7 and 2*5 - 5 = 5 are both prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[p_]:=PQ[p]=PrimeQ[p+2]&&PrimeQ[2p-5]
    m=0
    Do[If[PQ[Prime[n]],m=m+1;Print[m," ",Prime[n]]],{n,1,584}]
  • PARI
    is_A230138(p)=isprime(p)&&isprime(p+2)&&isprime(p*2-5) \\ For large p it might be much faster to check first whether p%6==5. - M. F. Hasler, Oct 10 2013

A290838 a(n) = smallest prime p such that 2p - 2n + 1 is prime.

Original entry on oeis.org

2, 2, 3, 5, 5, 7, 7, 13, 11, 11, 11, 13, 13, 19, 17, 17, 17, 19, 19, 37, 23, 23, 23, 29, 29, 31, 29, 29, 29, 31, 31, 37, 37, 41, 37, 37, 37, 43, 41, 41, 41, 43, 43, 61, 47, 47, 47, 53, 53, 67, 53, 53, 53, 59, 59, 61, 59, 59, 59, 61, 61, 67, 67, 71, 67, 67, 67, 73
Offset: 0

Views

Author

XU Pingya, Aug 11 2017

Keywords

Comments

a(n) > n. - Iain Fox, Nov 13 2017

Crossrefs

Programs

  • Mathematica
    Table[j=0; found=False; While[!found,j++; found=PrimeQ[2Prime[j]-2n+1] && 2Prime[j]-2n+1>0]; Prime[j],{n,67}]
    (* Second program: *)
    Table[SelectFirst[Prime@ Range[n^2], And[# > 0, PrimeQ@ #] &[2 # - 2 n + 1] &], {n, 67}] (* Michael De Vlieger, Aug 14 2017 *)
  • PARI
    a(n) = {my(p=2); while(!isprime(2*p-2*n+1), p = nextprime(p+1)); p; } \\ Michel Marcus, Aug 12 2017
    
  • PARI
    a(n) = forprime(p=n+1, , if(isprime(2*p - 2*n + 1), return(p))) \\ Iain Fox, Nov 13 2017

Formula

a(-n) = A290839(n+1) - Iain Fox, Dec 14 2017

Extensions

a(0) prepended by Iain Fox, Dec 14 2017

A167462 Primes p such that 2*p-5 is composite.

Original entry on oeis.org

7, 13, 19, 31, 37, 41, 43, 61, 67, 73, 79, 83, 97, 103, 107, 109, 113, 127, 139, 151, 157, 163, 167, 173, 181, 191, 193, 199, 211, 223, 229, 239, 241, 251, 269, 271, 277, 283, 293, 307, 313, 317, 331, 337, 347, 349, 359, 367, 373, 379, 397, 409, 419, 421
Offset: 1

Views

Author

Vincenzo Librandi, Nov 04 2009

Keywords

Crossrefs

Cf. A063909.

Programs

  • Magma
    [p: p in PrimesInInterval(4,600)| not IsPrime(2*p-5)]; // Vincenzo Librandi, Sep 15 2013
  • Mathematica
    Select[Range[4, 3000], PrimeQ[#]&& ! PrimeQ[2 # - 5] &](* Vincenzo Librandi, Sep 15 2013 *)
    Select[Prime[Range[100]],CompositeQ[2#-5]&] (* Harvey P. Dale, May 16 2016 *)

Extensions

Corrected (229 inserted) by R. J. Mathar, Nov 30 2009
Corrected (3 deleted, as 2*3-5 = 1 and 1 is not composite) by Harvey P. Dale, May 16 2016
Showing 1-5 of 5 results.