cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-6 of 6 results.

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

Views

Author

Labos Elemer, Jun 05 2000

Keywords

Comments

The term "exactly" means that before the first and after the last terms of the run, the next primes are not congruent to 1 modulo 4.
Carlos Rivera's Puzzle 256 includes Jack Brennen's a(29) starting at 689101181569 to 689101182437 and asks if anyone can break that 1999 record.

Examples

			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
		

Crossrefs

Programs

  • Mathematica
    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 *)

Formula

Compute sequence of primes congruent to 1 mod 4. When first occurrence of run of exactly length n is found, add first prime to sequence.

Extensions

Corrected and extended by Reiner Martin, Jul 18 2001
More terms from Jens Kruse Andersen, May 29 2006
Edited by N. J. A. Sloane, Jun 01 2006

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

Views

Author

Robert G. Wilson v, Oct 09 2000

Keywords

Comments

Same as A057621 except for a(1). See A057620 for primes congruent to 1 (mod 6). See A055626 for the variant "exactly n", which is an upper bound, cf. formula. - M. F. Hasler, Sep 03 2016
The sequence is infinite, by Shiu's theorem. - Jonathan Sondow, Jun 22 2017

Examples

			a(12) = 1820111 because this number is the first in a sequence of 12 consecutive primes all of the form 6n + 5.
		

References

  • R. K. Guy, "Unsolved Problems in Number Theory", A4

Crossrefs

Programs

  • Mathematica
    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 *)

Formula

a(n) = A000040(A247967(n)). a(n) = min { A055626(k); k >= n }. - M. F. Hasler, Sep 03 2016

Extensions

More terms from Don Reble, Nov 16 2003
More terms from Jens Kruse Andersen, May 30 2006
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

Views

Author

Robert G. Wilson v, Oct 09 2000

Keywords

Comments

See A055626 for the variant "exactly n". See A247967 for the indices of these primes. See A057620, A057621 for variants "congruent to 5 (mod 6)", resp. "(mod 3)". - M. F. Hasler, Sep 03 2016
The sequence is infinite, by Shiu's theorem. - Jonathan Sondow, Jun 22 2017

Examples

			a(6) = 1741 because this number is the first in a sequence of 6 consecutive primes all of the form 3n + 1.
		

References

  • R. K. Guy, "Unsolved Problems in Number Theory", A4

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    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

Formula

a(n) <= A055625(n). - Zak Seidov, Aug 29 2016
a(n) = A000040(A247967(n)). a(n) = min { A055625(k); k >= n }. - M. F. Hasler, Sep 03 2016

Extensions

More terms from Don Reble, Nov 16 2003
More terms from Jens Kruse Andersen, May 30 2006
Definition clarified by Zak Seidov, Jun 19 2017

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

Views

Author

Labos Elemer, Jun 05 2000

Keywords

Comments

The term "exactly" means that before the first and after the last terms of chain, the immediate primes are not congruent to 3 modulo 4.
Carlos Rivera's Puzzle 256 includes Jack Brennen's a(24) starting at 1602195714419 to 1602195715423 and asks if anyone can break that 1999 record.

Examples

			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.
		

Crossrefs

Formula

Compute sequence of primes congruent to 3 mod 4. When first occurrence of run of exactly length n is found, add first prime to sequence.

Extensions

More terms from Reiner Martin, Jul 18 2001
More terms from Jens Kruse Andersen, May 29 2006
Edited by N. J. A. Sloane, Jun 01 2006

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

Views

Author

Labos Elemer, Jun 05 2000

Keywords

Comments

The term "exactly" means that before the first and after the last primes of chain, the immediate primes are not congruent to 1 modulo 6.
See A057620 for the variant where "exactly" is replaced by "at least". - M. F. Hasler, Sep 03 2016

Crossrefs

Programs

  • Fortran
    c See link in A085515.
  • Mathematica
    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 *)

Extensions

Corrected and extended by Reiner Martin, May 19 2001
More terms from Hugo Pfoertner, Jul 31 2003
a(20)>2^31, a(21)=1444257673. - Hugo Pfoertner, Jul 31 2003
More terms from Jens Kruse Andersen, May 30 2006
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

Views

Author

Hugo Pfoertner, Jul 31 2003

Keywords

Comments

This sequence gives the index of A055626(n) after sorting by increasing magnitude.

Examples

			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.
		

Crossrefs

Cf. A055626, A085515 (sorted occurrence of first runs of "6k+1" primes).

Programs

  • Fortran
    ! Program given at link.

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 27 2006
a(32)-a(35) from Giovanni Resta, Aug 04 2013
Showing 1-6 of 6 results.