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.

A005383 Primes p such that (p+1)/2 is prime.

Original entry on oeis.org

3, 5, 13, 37, 61, 73, 157, 193, 277, 313, 397, 421, 457, 541, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917, 3061, 3217, 3253
Offset: 1

Views

Author

Keywords

Comments

Also, n such that sigma(n)/2 is prime. - Joseph L. Pe, Dec 10 2001; confirmed by Vladeta Jovovic, Dec 12 2002
Primes that are followed by twice a prime, i.e., are followed by a semiprime. (For primes followed by two semiprimes, see A036570.) - Zak Seidov, Aug 03 2013, Dec 31 2015
If A005382(n) is in A168421 then a(n) is a twin prime with a Ramanujan prime, A104272(k) = a(n) - 2. - John W. Nicholson, Jan 07 2016
Starting with 13 all terms are congruent to 1 mod 12. - Zak Seidov, Feb 16 2017
Numbers n such that both n and n+12 are terms are 61, 661, 1201, 4261, 5101, 6121, 6361 (all congruent to 1 mod 60). - Zak Seidov, Mar 16 2017
Primes p for which there exists a prime q < p such that 2q == 1 (mod p). Proof: q = (p + 1)/2. - David James Sycamore, Nov 10 2018
Prime numbers n such that phi(sigma(2n)) = phi(2n), excluding n=3 and n=5; as well as phi(sigma(3n)) = phi(3n), excluding n=3 only. - Richard R. Forberg, Dec 22 2020

Examples

			Both 3 and (3+1)/2 = 2 are primes, both 5 and (5+1)/2 = 3 are primes. - _Zak Seidov_, Nov 19 2012
		

References

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

Crossrefs

A subsequence of A000040 which has A036570 as subsequence.

Programs

  • Haskell
    a005383 n = a005383_list !! (n-1)
    a005383_list = [p | p <- a065091_list, a010051 ((p + 1) `div` 2) == 1]
    -- Reinhard Zumkeller, Nov 06 2012
    
  • MATLAB
    LIMIT = 8000 % Find all members of A005383 less than LIMIT A = primes(LIMIT); n = length(A); %n is number of primes less than LIMIT B = 2*A - 1; C = ones(n, 1)*A; %C is an n X n matrix, with C(i, j) = j-th prime D = B'*ones(1, n); %D is an n X n matrix, with D(i, j) = (i-th prime)*2 - 1 [i, j] = find(C == D); A(j)
    
  • Magma
    [n: n in [1..3300] | IsPrime(n) and IsPrime((n+1) div 2) ]; // Vincenzo Librandi, Sep 25 2012
    
  • Maple
    for n to 300 do
      X := ithprime(n);
    Y := ithprime(n+1);
    Z := 1/2 mod Y;
      if isprime(Z) then print(Y);
    end if:
    end do:
    # David James Sycamore, Nov 11 2018
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[(# + 1)/2] &] (* Zak Seidov, Nov 19 2012 *)
  • PARI
    A005383_list(n) = select(m->isprime(m\2+1),primes(n)[2..n]) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Python
    from sympy import isprime
    [n for n in range(3, 5000) if isprime(n) and isprime((n + 1)//2)]
    # Indranil Ghosh, Mar 17 2017
    
  • Sage
    [n for n in prime_range(3, 1000) if is_prime((n + 1) // 2)]
    # F. Chapoton, Dec 17 2019

Formula

a(n) = A129521(n)/A005382(n). - Reinhard Zumkeller, Apr 19 2007
A000035(a(n))*A010051(a(n))*A010051((a(n)+1)/2) = 1. - Reinhard Zumkeller, Nov 06 2012
a(n) = 2*A005382(n) - 1. - Zak Seidov, Nov 19 2012
a(n) = A005382(n) + phi(A005382(n)) = A005382(n) + A000010(A005382(n)). - Torlach Rush, Mar 10 2014

Extensions

More terms from David Wasserman, Jan 18 2002
Name changed by Jianing Song, Nov 27 2021