A176045 Numbers n such that n-1 and 2*n-1 are both prime.
3, 4, 6, 12, 24, 30, 42, 54, 84, 90, 114, 132, 174, 180, 192, 234, 240, 252, 282, 294, 360, 420, 432, 444, 492, 510, 594, 642, 654, 660, 684, 720, 744, 762, 810, 912, 954, 1014, 1020, 1032, 1050, 1104, 1224, 1230, 1290, 1410, 1440, 1452, 1482, 1500, 1512, 1560
Offset: 1
Keywords
Examples
6-1 = 5 and 2*6-1 = 11 are both prime, so 6 is in the sequence. 7-1 = 6 and 2*7-1 = 13 are not both prime, so 7 is not in the sequence. p = 3, q = 7; p^2 + q = 16, a(n) = sqrt(16) = 4. - _Richard R. Forberg_, Mar 04 2015
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Magma
[ n: n in [2..1600] | IsPrime(n-1) and IsPrime(2*n-1) ]; // Klaus Brockhaus, Apr 19 2010
-
Maple
with(numtheory):for n from 2 to 2000 do:if type((2*n-1),prime)=true and type((n-1),prime)=true then print(n):else fi:od:
-
Mathematica
Select[Prime[Range[250]],PrimeQ[2#+1]&]+1 (* Harvey P. Dale, Jul 31 2013 *)
-
PARI
isok(n) = isprime(n-1) && isprime(2*n-1); \\ Michel Marcus, Apr 06 2016
Extensions
Edited and 1482 inserted by Klaus Brockhaus, Apr 19 2010
Comments