A084960
Initial prime of a prime chain of length n under the iteration x->5x+4.
Original entry on oeis.org
2, 3, 5, 83, 263, 5333, 5333, 6714497, 42360737, 3757699889, 3757699889, 1431898413161, 5654774136689, 12756824771254199, 184574272412533499
Offset: 1
a(3) = 5 since 5, f(5) = 29 and f(29) = 149 are primes when f(x) = 5x+4.
-
t[p_] := Block[{c=1, q = 5*p+4}, While[ PrimeQ@q, q = 5*q + 4; c++]; c]; a[n_] := Block[{p = 2}, While[t[p] < n, p = NextPrime@ p]; p]; Array[a, 8] (* Giovanni Resta, Mar 21 2017 *)
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.
A084958
Initial prime of a prime chain of length n under the iteration x->5x+2.
Original entry on oeis.org
2, 3, 13, 19, 373, 135859, 135859, 18235423, 26588257, 93112729, 376038903103, 7087694466289, 120223669028389
Offset: 1
a(3)=13 since 13, f(13)=67 and f(67)=337 are primes when f(x) = 5x+2.
-
c[p_] := Block[{k = 1, q = 5*p+2}, While[ PrimeQ[q], q = 5*q+2; k++]; k]; a[n_] := Block[{p = 2}, While[c[p] < n, p = NextPrime@ p]; p]; Array[a, 7] (* Giovanni Resta, Mar 21 2017 *)
A084956
Initial prime of the first prime chain of length n under the iteration x -> 3x+4.
Original entry on oeis.org
2, 3, 3, 23, 3203, 34613, 165443, 1274803, 26314573, 26314573, 590256673403, 15113026057043, 334156170011893, 3998669569752373
Offset: 1
a(3) = 3 since 3, f(3) = 13 and f(13) = 43 are primes when f(x) = 3*x + 4.
-
c[p_] := Block[{k=1, q=3*p + 4}, While[PrimeQ[q], q=3*q+4; k++]; k]; a[n_] := Block[{p = 2}, While[c[p] < n, p = NextPrime[p]]; p]; Array[a, 7] (* Giovanni Resta, Mar 22 2017 *)
A084957
Initial prime of the first prime chain of length n under the iteration x -> 4x + 3.
Original entry on oeis.org
2, 2, 2, 2, 1447, 9769, 17231, 17231, 32611, 18527009, 161205841, 3123824801, 26813406071, 4398156030379, 4398156030379
Offset: 1
a(3) = 2 since 2, f(2) = 11, and f(11) = 47 are primes when f(x) = 4*x + 3.
-
c[p_] := Block[{k=1, q=4*p+3}, While[ PrimeQ[q], q=4*q+3; k++]; k]; a[n_] := Block[ {p=2}, While[c[p] < n, p = NextPrime@ p]; p]; Array[a, 9] (* Giovanni Resta, Mar 21 2017 *)
-
has(p,n)=for(i=2,n, if(!isprime(p=4*p+3), return(0))); 1
a(n)=forprime(p=2,, if(has(p,n), return(p))) \\ Charles R Greathouse IV, Jan 20 2017
A084959
Initial prime of a prime chain of length n under the iteration x->5x+6.
Original entry on oeis.org
2, 5, 7, 7, 79, 79, 345431, 21171649, 34640153, 4174239239, 268130051191, 268130051191, 253134809926049, 253134809926049, 253134809926049
Offset: 1
a(3) = 13 since 7, f(7) = 41, and f(41) = 211 are primes when f(x) = 5*x + 6.
-
c[p_] := Block[{k=1, q = 5*p+6}, While[PrimeQ[q], q = 5*q+6; k++]; k]; a[n_] := Block[{p = 2}, While[c[p] < n, p = NextPrime[p]]; p]; Array[a, 7] (* Giovanni Resta, Mar 22 2017 *)
A084961
Initial prime of the first prime chain of length n under the iteration x->6x+5.
Original entry on oeis.org
2, 2, 2, 2, 11, 13, 115571, 23586221, 53165771, 3398453717, 615502598677, 32504183957101, 164289842304587
Offset: 1
a(3) = 2 since 2, f(2) = 17, and f(17) = 107 are primes when f(x) = 6*x + 5.
-
c[p_] := Block[{k=1, q=6*p+5}, While[ PrimeQ[q], q = 6*q+5; k++]; k]; a[n_] := Block[ {p=2}, While[c[p] < n, p = NextPrime[p]]; p]; Array[a, 7] (* Giovanni Resta, Mar 22 2017 *)
Original entry on oeis.org
1, 2, 89, 1122659, 19099919, 85864769, 26089808579, 554688278429, 4090932431513069, 95405042230542329
Offset: 1
- Carl Pomerance, Problem 81:21 (= 321), in R. K. Guy link.
- R. K. Guy, editor, Western Number Theory Problems, 1985-12-21 & 23, Typescript, Jul 13 1986, Dept. of Math. and Stat., Univ. Calgary, 11 pages. Annotated scan of pages 1, 3, 7, 9, with permission.
Original entry on oeis.org
1, 3, 90, 1122660, 19099920, 85864770, 26089808580, 554688278430, 4090932431513070, 95405042230542330
Offset: 1
90 is in the sequence as A339579(90) = 6 (90*2^k - 1 is prime for k = 0..5 and composite for k = 6) and A339579(m) < 6 for m < 90. - _David A. Corneth_, Dec 24 2020
- Carl Pomerance, Problem 81:21 (= 321), in R. K. Guy problem list.
- R. K. Guy, editor, Western Number Theory Problems, 1985-12-21 & 23, Typescript, Jul 13 1986, Dept. of Math. and Stat., Univ. Calgary, 11 pages. Annotated scan of pages 1, 3, 7, 9, with permission.
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
Comments