A005383 Primes p such that (p+1)/2 is prime.
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
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).
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- R. P. Boas & N. J. A. Sloane, Correspondence, 1974
- Benoit Cloitre, On the fractal behavior of primes, 2011.
Crossrefs
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) = 2*A005382(n) - 1. - Zak Seidov, Nov 19 2012
Extensions
More terms from David Wasserman, Jan 18 2002
Name changed by Jianing Song, Nov 27 2021
Comments