login
Numbers k such that both 2k+1 and 3k+1 are primes.
6

%I #24 Sep 08 2022 08:45:30

%S 2,6,14,20,26,36,50,54,74,90,116,140,146,174,200,204,210,224,230,270,

%T 284,306,330,336,350,354,384,404,410,426,440,476,510,516,554,564,596,

%U 600,624,644,650,704,714,726,740,746,834,846,894,930,944,950,1026,1040

%N Numbers k such that both 2k+1 and 3k+1 are primes.

%C Also: k such that A033570(k) is semiprime. All terms are congruent to 0 or 2 modulo 6. - _M. F. Hasler_, Dec 13 2019

%H Harvey P. Dale, <a href="/A130800/b130800.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = 2*A255607(n). - _M. F. Hasler_, Dec 13 2019

%t Select[Range[1100],AllTrue[{2,3}#+1,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, May 17 2016 *)

%o (Magma) [n: n in [0..500] | IsPrime(2*n+1) and IsPrime(3*n+1)]; // _Vincenzo Librandi_, Nov 23 2010

%o (PARI) select( is_A130800(n)=isprime(2*n+1)&&isprime(3*n+1), [1..1111]) \\ _M. F. Hasler_, Dec 13 2019

%Y Intersection of A005097 and A024892. - _M. F. Hasler_, Dec 13 2019

%Y Cf. A033570; A255584: semiprimes of the form (4*n+1)*(6*n+1).

%K nonn

%O 1,1

%A _Max Alekseyev_, Jul 18 2007

%E More terms from _Vincenzo Librandi_, Mar 26 2010