A055623
First occurrence of run of primes congruent to 1 mod 4 of exactly length n.
Original entry on oeis.org
5, 13, 89, 389, 2593, 12401, 77069, 262897, 11593, 373649, 766261, 3358169, 12204889, 18256561, 23048897, 12270077, 297387757, 310523021, 297779117, 3670889597, 5344989829, 1481666377, 2572421893, 1113443017, 121117598053, 84676452781, 790457451349, 3498519134533, 689101181569, 3289884073409
Offset: 1
a(3)=89 because here n=3 and 89 is the start of a run of exactly 3 consecutive primes congruent to 1 mod 4.
n=3: 83, 89, 97, 101, 103 are congruent to 3, 1, 1, 1, 3 modulo 4. So a(3) = 89.
a(33) = 3278744415797. - _Jens Kruse Andersen_, May 29 2006
-
nn = 10; t = Table[0, {nn}]; found = 0; p = 1; cnt = 0; While[found < nn, p = NextPrime[p]; If[Mod[p, 4] == 1, cnt++, If[0 < cnt <= nn && t[[cnt]] == 0, t[[cnt]] = NextPrime[p, -cnt]; found++]; cnt = 0]]; t (* T. D. Noe, Jun 21 2013 *)
A057622
Initial prime in first sequence of n consecutive primes congruent to 5 modulo 6.
Original entry on oeis.org
5, 23, 47, 251, 1889, 7793, 43451, 243161, 726893, 759821, 1820111, 1820111, 10141499, 19725473, 19725473, 136209239, 400414121, 400414121, 489144599, 489144599, 766319189, 766319189, 21549657539, 21549657539, 21549657539, 140432294381, 140432294381, 437339303279, 1871100711071, 3258583681877
Offset: 1
a(12) = 1820111 because this number is the first in a sequence of 12 consecutive primes all of the form 6n + 5.
- R. K. Guy, "Unsolved Problems in Number Theory", A4
-
p = 0; Do[a = Table[-1, {n}]; k = Max[1, p]; While[Union@ a != {5}, k = NextPrime@ k; a = Take[AppendTo[a, Mod[k, 6]], -n]]; p = NestList[NextPrime[#, -1] &, k, n]; Print[p[[-2]]]; p = p[[-1]], {n, 18}] (* Robert G. Wilson v, updated by Michael De Vlieger, Sep 03 2016 *)
Table[k = 1; While[Total@ Boole@ Map[Mod[#, 6] == 5 &, NestList[NextPrime, Prime@ k, n - 1]] != n, k++]; Prime@ k, {n, 12}] (* Michael De Vlieger, Sep 03 2016 *)
Three lines of data (derived from J.K.Andersen's web page) completed by
M. F. Hasler, Sep 02 2016
A057620
Initial prime in first sequence of n consecutive primes congruent to 1 modulo 6.
Original entry on oeis.org
7, 31, 151, 1741, 1741, 1741, 19471, 118801, 148531, 148531, 406951, 2339041, 2339041, 51662593, 51662593, 73451737, 232301497, 450988159, 1444257673, 1444257673, 1444257673, 24061965043, 24061965043, 43553959717, 43553959717
Offset: 1
a(6) = 1741 because this number is the first in a sequence of 6 consecutive primes all of the form 3n + 1.
- R. K. Guy, "Unsolved Problems in Number Theory", A4
-
p = 0; Do[a = Table[-1, {n}]; k = Max[1, p]; While[Union[a] != {1}, k = NextPrime[k]; a = Take[AppendTo[a, Mod[k, 3]], -n]]; p = NestList[NextPrime[#, -1] &, k, n]; Print[p[[-2]]]; p = p[[-1]], {n, 1, 18}] (* Robert G. Wilson v, updated by Michael De Vlieger, Sep 03 2016 *)
Table[k = 1; While[Total@ Boole@ Map[Mod[#, 6] == 1 &, NestList[NextPrime, Prime@ k, n - 1]] != n, k++]; Prime@ k, {n, 12}] (* Michael De Vlieger, Sep 03 2016 *)
-
m=c=o=0; forprime(p=1,, p%6 != 1 && (!c||!c=0) && next; c||o=p; c++>m||next; m++; print1(", ",o)) \\ M. F. Hasler, Sep 03 2016
A055624
First occurrence of run of primes congruent to 3 mod 4 of exactly length n.
Original entry on oeis.org
3, 7, 739, 199, 883, 13127, 463, 36551, 39607, 183091, 4468903, 6419299, 241603, 11739307, 9177431, 95949311, 105639091, 341118307, 1800380579, 727334879, 9449915743, 1786054147, 22964264027, 54870713243, 79263248027, 454648144571, 722204126767, 1749300591127, 5070807638111, 8858854801319, 6425403612031, 113391385603
Offset: 1
a(3)=739 because here n=3 and 739 is the start of a run of exactly 3 consecutive primes congruent to 3 mod 4.
A055625
First prime starting a chain of exactly n consecutive primes congruent to 1 modulo 6.
Original entry on oeis.org
7, 31, 151, 3049, 7351, 1741, 19471, 118801, 498259, 148531, 406951, 2513803, 2339041, 89089369, 51662593, 73451737, 232301497, 450988159, 1558562197, 2506152301, 1444257673, 28265029657, 24061965043, 87996684091, 43553959717
Offset: 1
-
c See link in A085515.
-
pp = Table[{p = Prime[n], Mod[p, 6]}, {n, 10^6}];
sp = Split[pp, Mod[#1[[2]], 6] == Mod[#2[[2]], 6]&];
a[n_] := SelectFirst[sp, Length[#] == n && MatchQ[#, {{_Integer, 1} ..}]& ][[1, 1]];
Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 13}] (* Jean-François Alcover, Nov 21 2018 *)
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 27 2006
A085516
Order of first occurrence of a sequence of exactly n consecutive primes of the form 6*k-1.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 11, 13, 15, 14, 16, 18, 20, 17, 22, 19, 21, 25, 23, 24, 27, 26, 28, 29, 30, 31, 32, 35, 33, 34
Offset: 1
a(2)=2, a(3)=3, a(4)=4 because the first occurrence of exactly 3 consecutive primes of the form 6*k-1 (47,53,59) follows the first occurrence of exactly 2 (23,29) and precedes the first occurrence of exactly 4 (251,257,263,269) primes of this form.
Cf.
A055626,
A085515 (sorted occurrence of first runs of "6k+1" primes).
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 27 2006
Showing 1-6 of 6 results.
Comments