login
Numbers k such that k and 2*k-3 are primes.
29

%I #60 Sep 08 2022 08:45:04

%S 3,5,7,11,13,17,23,31,37,41,43,53,67,71,83,97,101,107,113,127,137,157,

%T 167,181,191,193,211,223,233,241,251,263,283,311,317,331,347,373,421,

%U 431,433,443,457,461,487,521,547,563,577,587,613,617,631,641,643,647

%N Numbers k such that k and 2*k-3 are primes.

%C If p is in this sequence then the products of positive powers of 3, p and 2p-3 are entries in A086486. - Victoria A Sapko (vsapko(AT)canes.gsw.edu), Sep 23 2003

%C Median prime of AP3's starting at 3, i.e., triples of primes (3,p,q) in arithmetic progression. - _M. F. Hasler_, Sep 24 2009

%C a(n) = sum of the coprimes(p) mod (p+1). - _J. M. Bergot_, Nov 13 2014

%C A010051(2*a(n)-3) = 1. - _Reinhard Zumkeller_, Jul 02 2015

%C A098090 INTERSECT A000040. - _R. J. Mathar_, Mar 23 2017

%H Harry J. Smith and K. D. Bajpai, <a href="/A063908/b063908.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Harry J. Smith)

%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_034.htm">Puzzle 34.- Prime Triplets in arithmetic progression</a>, The Prime Puzzles & Problems Connection. [From _M. F. Hasler_, Sep 24 2009]

%F a(n) = A241817(n)/2. - _Wesley Ivan Hurt_, Apr 08 2018

%e From _K. D. Bajpai_, Nov 29 2019: (Start)

%e a(5) = 13 is prime and 2*13 - 3 = 23 is also prime.

%e a(6) = 17 is prime and 2*17 - 3 = 31 is also prime.

%e (End)

%p select(k -> andmap(isprime, [k, 2*k-3]), [seq(k, k=1.. 10^4)]); # _K. D. Bajpai_, Nov 29 2019

%t Select[Prime[Range[6! ]],PrimeQ[2*#-3]&] (* _Vladimir Joseph Stephan Orlovsky_, Nov 17 2009 *)

%o (PARI) { n=0; p=1; for (m=1, 10^9, p=nextprime(p+1); if (isprime(2*p - 3), write("b063908.txt", n++, " ", p); if (n==1000, break)) ) } \\ _Harry J. Smith_, Sep 02 2009

%o (PARI) forprime( p=1,default(primelimit), isprime(2*p-3) && print1(p",")) \\ _M. F. Hasler_, Sep 24 2009

%o (Magma) [n : n in [0..700] | IsPrime(n) and IsPrime(2*n-3)]; // _Vincenzo Librandi_, Nov 14 2014

%o (Haskell)

%o a063908 n = a063908_list !! (n-1)

%o a063908_list = filter

%o ((== 1) . a010051' . (subtract 3) . (* 2)) a000040_list

%o -- _Reinhard Zumkeller_, Jul 02 2015

%Y Cf. A005382.

%Y Cf. A000040, A010051, A088878, A172287.

%Y Cf. A259730.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Aug 31 2001