A059762
Initial primes of Cunningham chains of first type with length exactly 3. Primes in A059453 that survive as primes just two "2p+1 iterations", forming chains of exactly 3 terms.
Original entry on oeis.org
41, 1031, 1451, 1481, 1511, 1811, 1889, 1901, 1931, 3449, 3491, 3821, 3911, 5081, 5441, 5849, 6101, 6131, 7151, 7349, 7901, 8969, 9221, 10691, 10709, 11171, 11471, 11801, 12101, 12821, 12959, 13229, 14009, 14249, 14321, 14669, 14741, 15161
Offset: 1
41 is a term because 20 and 325 are composites, and 41, 83, and 167 are primes.
-
ipccQ[n_]:=Module[{c=(n-1)/2},PrimeQ[NestList[2#+1&,c,4]]=={False, True, True, True, False}]; Select[Prime[Range[2000]],ipccQ] (* Harvey P. Dale, Nov 10 2014 *)
A059761
Initial primes of Cunningham chains of first type with length exactly 2. Primes in A059453 that survive as primes only one "2p-1 iteration", forming chains of exactly 2 terms.
Original entry on oeis.org
3, 29, 53, 113, 131, 173, 191, 233, 239, 251, 281, 293, 419, 431, 443, 491, 593, 641, 653, 659, 683, 743, 761, 809, 911, 953, 1013, 1049, 1103, 1223, 1289, 1499, 1559, 1583, 1601, 1733, 1973, 2003, 2069, 2129, 2141, 2273, 2339, 2351, 2393, 2399, 2543
Offset: 1
53 is a term because 26 and 215 are composites, and 53 and 107 are primes.
-
ccftQ[p_]:=Boole[PrimeQ[{(p-1)/2,p,2 p+1,4 p+3}]]=={0,1,1,0}; Select[ Prime[ Range[400]],ccftQ] (* Harvey P. Dale, Jun 19 2021 *)
A059764
Initial (unsafe) primes of Cunningham chains of first type with length exactly 5. Primes in A059453 that survive as primes just four "2p+1 iterations", forming chains of exactly 5 terms.
Original entry on oeis.org
2, 53639, 53849, 61409, 66749, 143609, 167729, 186149, 206369, 268049, 296099, 340919, 422069, 446609, 539009, 594449, 607319, 658349, 671249, 725009, 775949, 812849, 819509, 926669, 1008209, 1092089, 1132949, 1271849
Offset: 1
2 is here because (2-1)/2 = 1/2 and 32*2+31 = 95 are not primes, while 2, 5, 11, 23, and 47 give a first-kind Cunningham chain of 5 primes which cannot be continued.
53639 is here because through <2p+1>, 53639 -> 107279 -> 214559 -> 429119 -> 858239 and the chain ends here (with this operator).
Cf.
A023272,
A023302,
A023330,
A005384,
A005385,
A059452-
A059455,
A007700,
A059759,
A059760,
A059761,
A059762,
A059763,
A059764,
A059765,
A038397,
A104349,
A091314,
A069362,
A016093,
A014937,
A057326.
-
l5Q[n_]:=Module[{a=PrimeQ[(n-1)/2],b=PrimeQ[ NestList[2#+1&,n,5]]}, Join[{a},b]=={False,True,True,True,True,True,False}]; Select[Range[ 1300000],l5Q] (* Harvey P. Dale, Oct 14 2012 *)
A059690
Number of distinct Cunningham chains of first kind whose initial prime (cf. A059453) <= 2^n.
Original entry on oeis.org
1, 2, 2, 2, 3, 5, 7, 13, 20, 31, 52, 83, 142, 242, 412, 742, 1308, 2294, 4040, 7327, 13253, 24255, 44306, 81700, 150401, 277335, 513705, 954847, 1780466, 3325109, 6224282, 11676337, 21947583, 41327438
Offset: 1
a(11)-a(10) = 21 means that between 1024 and 2048 exactly 21 primes introduce Cunningham chains: {1031, 1049, 1103, 1223, 1229, 1289, 1409, 1451, 1481, 1499, 1511, 1559, 1583, 1601, 1733, 1811, 1889, 1901, 1931, 1973, 2003}.
Their lengths are 2, 3 or 4. Thus the complete chains spread over more than one binary size-zone: {1409, 2819, 5639, 11279}. The primes 1439 and 2879 also form a chain but 1439 is not at the beginning of that chain, 89 is.
Cf.
A023272,
A023302,
A023330,
A005602,
A007700,
A053176,
A059452-
A059456,
A059500,
A057331,
A059688,
A007053,
A036378,
A029837,
A007053.
-
c = 0; k = 1; Do[ While[k <= 2^n, If[ PrimeQ[k] && !PrimeQ[(k - 1)/2] && PrimeQ[2k + 1], c++ ]; k++ ]; Print[c], {n, 1, 29}]
-
from itertools import count, islice
from sympy import isprime, primerange
def c(p): return not isprime((p-1)//2) and isprime(2*p+1)
def agen():
s = 1
for n in count(2):
yield s; s += sum(1 for p in primerange(2**(n-1)+1, 2**n) if c(p))
print(list(islice(agen(), 20))) # Michael S. Branicky, Oct 09 2022
Title and a(30)-a(31) corrected, and a(32) from
Sean A. Irvine, Oct 02 2022
A053176
Primes p such that 2p+1 is composite.
Original entry on oeis.org
7, 13, 17, 19, 31, 37, 43, 47, 59, 61, 67, 71, 73, 79, 97, 101, 103, 107, 109, 127, 137, 139, 149, 151, 157, 163, 167, 181, 193, 197, 199, 211, 223, 227, 229, 241, 257, 263, 269, 271, 277, 283, 307, 311, 313, 317, 331, 337, 347, 349, 353, 367, 373, 379, 383
Offset: 1
17 is a term because 2*17 + 1 = 35 is composite.
Cf.
A005384,
A005385,
A059452,
A059453,
A059454,
A059455,
A059456,
A007700,
A005602,
A023272,
A023302,
A023330,
A156543,
A156542.
A059455
Safe primes which are also Sophie Germain primes.
Original entry on oeis.org
5, 11, 23, 83, 179, 359, 719, 1019, 1439, 2039, 2063, 2459, 2819, 2903, 2963, 3023, 3623, 3779, 3803, 3863, 4919, 5399, 5639, 6899, 6983, 7079, 7643, 7823, 10163, 10799, 10883, 11699, 12203, 12263, 12899, 14159, 14303, 14699, 15803, 17939
Offset: 1
83 is a term because it is prime and 2*83+1 = 167 and (83-1)/2 = 41 are both primes.
Cf.
A053176,
A059452,
A059453,
A059455,
A059456,
A007700,
A005602,
A023272,
A023302,
A023330,
A156659,
A156660,
A156877,
A162019.
-
[p: p in PrimesUpTo(20000) |IsPrime((p-1) div 2) and IsPrime(2*p+1)]; // Vincenzo Librandi, Oct 31 2014
-
lst={}; Do[p=Prime[n]; If[PrimeQ[(p-1)/2]&&PrimeQ[2*p+1], AppendTo[lst, p]], {n, 7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 02 2008 *)
Select[Prime[Range[1000]], AllTrue[{(# - 1)/2, 2 # + 1}, PrimeQ] &] (* requires Mathematica 10+; Feras Awad, Dec 19 2018 *)
-
forprime(p=2,1e5,if(isprime(p\2)&&isprime(2*p+1),print1(p", "))) \\ Charles R Greathouse IV, Jul 15 2011
-
from itertools import count, islice
from sympy import isprime, prime
def A059455_gen(): # generator of terms
return filter(lambda p:isprime(p>>1) and isprime(p<<1|1),(prime(i) for i in count(1)))
A059455_list = list(islice(A059455_gen(),10)) # Chai Wah Wu, Jul 12 2022
A059452
Safe primes (A005385) that are not Sophie Germain primes.
Original entry on oeis.org
7, 47, 59, 107, 167, 227, 263, 347, 383, 467, 479, 503, 563, 587, 839, 863, 887, 983, 1187, 1283, 1307, 1319, 1367, 1487, 1523, 1619, 1823, 1907, 2027, 2099, 2207, 2447, 2579, 2879, 2999, 3119, 3167, 3203, 3467, 3947, 4007, 4079, 4127, 4139, 4259, 4283
Offset: 1
347 is a term because 173 is a prime but 695 is not.
Cf.
A005384,
A059452,
A059453,
A059454,
A059455,
A059456,
A007700,
A005602,
A023272,
A023302,
A023330,
A156659,
A156660.
-
lst={};Do[p=Prime[n];If[PrimeQ[(p-1)/2],If[ !PrimeQ[2*p+1],AppendTo[lst,p]]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jun 24 2009 *)
-
is(p) = p > 2 && isprime(p) && isprime((p-1)/2) && !isprime(2*p+1); \\ Amiram Eldar, Jul 15 2024
-
from itertools import count, islice
from sympy import isprime, prime
def A059452_gen(): # generator of terms
return filter(lambda p:isprime(p>>1) and not isprime(p<<1|1),(prime(i) for i in count(1)))
A059452_list = list(islice(A059452_gen(),10)) # Chai Wah Wu, Jul 12 2022
A059763
Primes starting a Cunningham chain of the first kind of length 4.
Original entry on oeis.org
509, 1229, 1409, 2699, 3539, 6449, 10589, 11549, 11909, 12119, 17159, 19709, 19889, 22349, 26189, 27479, 30389, 43649, 55229, 57839, 60149, 71399, 74699, 75329, 82499, 87539, 98369, 101399, 104369, 112919, 122099, 139439, 148829, 166739
Offset: 1
1229 is a term because, through 2p+1, 1229 -> 2459 -> 4919 -> 9839 and the chain ends here since 2*9839 + 1 = 11*1789 is composite.
Cf.
A059759,
A059760,
A059761,
A059762,
A059763,
A059764,
A059765,
A038397,
A104349,
A091314,
A069362,
A016093,
A014937,
A057326.
-
isA059763 := proc(p) local pitr,itr ; if isprime(p) then if isprime( (p-1)/2 ) then RETURN(false) ; else pitr := p ; for itr from 1 to 3 do pitr := 2*pitr+1 ; if not isprime(pitr) then RETURN(false) ; fi ; od: pitr := 2*pitr+1 ; if isprime(pitr) then RETURN(false) ; else RETURN(true) ; fi ; fi ; else RETURN(false) ; fi ; end: for i from 2 to 100000 do p := ithprime(i) ; if isA059763(p) then printf("%d,",p) ; fi ; od: # R. J. Mathar, Jul 23 2008
Edited and extended by
R. J. Mathar, Jul 23 2008, Aug 18 2008
A059766
Initial (unsafe) primes of Cunningham chains of first type with length exactly 6.
Original entry on oeis.org
89, 63419, 127139, 405269, 810809, 1069199, 1178609, 1333889, 1598699, 1806089, 1958249, 2606069, 2848949, 3241289, 3339989, 3784199, 3962039, 4088879, 4444829, 4664249, 4894889, 4897709, 5132999, 5215499, 5238179, 6026309, 6059519, 6088529, 6490769, 6676259
Offset: 1
89 is a term because (89-1)/2 = 44 and 64*89+63 = 5759 = 13*443 are composites, while 89, 179, 359, 719, 1439, and 2879 are primes.
1122659 is not a term because it initiates a chain of length 7.
4658939 is not a term because (4658939-1)/2 = 2329469 is prime. - _Sean A. Irvine_, Oct 09 2022
Cf.
A023272,
A023302,
A023330,
A005384,
A005385,
A059452,
A059453,
A059454,
A059455,
A007700,
A059759,
A059760,
A059761,
A059762,
A059763,
A059764,
A038397,
A104349,
A091314,
A069362,
A016093,
A014937,
A057326.
A075712
Rearrangement of primes into Germain groups (or Cunningham chains).
Original entry on oeis.org
2, 5, 11, 23, 47, 3, 7, 13, 17, 19, 29, 59, 31, 37, 41, 83, 167, 43, 53, 107, 61, 67, 71, 73, 79, 89, 179, 359, 719, 1439, 2879, 97, 101, 103, 109, 113, 227, 127, 131, 263, 137, 139, 149, 151, 157, 163, 173, 347, 181, 191, 383, 193, 197, 199, 211, 223, 229, 233
Offset: 1
The groups are:
{2, 5, 11, 23, 47},
{3, 7},
{13},
{17},
{19},
{29, 59},
{31},
{37},
{41, 83, 167},
{43},
{53, 107},
{61},
{67},
{71},
{73},
{79},
{89, 179, 359, 719, 1439, 2879},
{97},
{101},
{103},
{109},
{113, 227},
{127},
{131, 263},
{137},
{139},
...
-
Block[{a = {2}, j = 1, k, p}, Do[k = j; If[PrimeQ@ a[[-1]], AppendTo[a, 2 a[[-1]] + 1], While[! FreeQ[a, Set[p, Prime[k]]], k++]; j++; Set[a, Append[a[[1 ;; -2]], p]]], 10^3]; a] (* Michael De Vlieger, Nov 17 2020 *)
-
first(n) = my(res=List([2,5,11,23,47])); forprime(p=3, oo, if(!isprime((p-1)>>1), listput(res,p); c = 2*p+1; while(isprime(c), listput(res,c); c=2*c+1)); if(#res>n,return(res))); res \\ David A. Corneth, Nov 13 2021
Showing 1-10 of 11 results.
Comments