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-2 of 2 results.

A289118 Least prime beginning a string, of length at least n, of consecutive primes which alternate between types 4*k+1 and 4*k+3 or 4*k+3 and 4*k+1.

Original entry on oeis.org

3, 3, 3, 23, 47, 131, 131, 233, 233, 521, 521, 521, 521, 521, 521, 51749, 505049, 1391087, 2264839, 2556713, 2569529, 2569529, 6160043, 6160043, 6160043, 43679609, 43679609, 198572029, 701575297, 5552898499, 6639843979, 9005520203, 9005520203, 99052377023
Offset: 1

Views

Author

Jonathan Sondow, Jun 25 2017

Keywords

Comments

Conjecture: the sequence is infinite. (Motivation: the string HTHTHT. . of length n eventually occurs in any sufficiently long sequence of coin tosses.)

Examples

			{Prime[k], Mod[ Prime[k], 4]} = {{3, 3}, {5, 1}, {7, 3}, {11, 3}, {13, 1}, {17, 1}, {19, 3}, {23, 3}, {29, 1}}, {31, 3}, {37, 1}, . . for k = 2, 3, 4, . ., so a(n) = 3, 3, 3, 23 for n = 1, 2, 3, 4.
		

References

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

Crossrefs

For the least prime at the start of such a string of length exactly n, see A247384.

Programs

  • Mathematica
    j = 2; T = Table[ While[ Product[ Mod[ Prime[k + 1] - Prime[k], 4], {k, j, j + n}] == 0,  j++]; Prime[j], {n, 0, 15}]; Prepend[T, 3]

Formula

a(n) = A247384(n) if and only if n > 1 and a(n) < a(n+1).

Extensions

a(18)-a(27) from Alois P. Heinz, Jun 26 2017
a(28)-a(34) from Giovanni Resta, Jul 02 2017

A289237 Find the first (maximal) string, of length exactly n, of consecutive primes that alternate between types 6*k+1 and 6*k+5 or 6*k+5 and 6*k+1. The first element is a(n).

Original entry on oeis.org

53, 29, 67, 37, 449, 179, 5, 389, 89, 2213, 11149, 10369, 6761, 113341, 80447, 151909, 43777, 2964553, 1457333, 175573, 809, 3954889, 121930481, 96050953, 15186319, 296080717, 98380549, 77011289, 2720227693, 5696814287, 1572386903, 4136299357, 288413159
Offset: 1

Views

Author

Jonathan Sondow, Jun 28 2017

Keywords

Comments

By the first Formula, a(21) = 809 since A289119(21) = 809 < A289119(22).

Examples

			{Prime[k], Mod[Prime[k], 6]} = {2, 2}, {3, 3}, {5, 5}, {7, 1}, {11, 5}, {13, 1}, {17, 5}, {19, 1}, {23, 5}, {29, 5}, {31, 1}, {37, 1}, {41, 5}, {43, 1}, {47, 5}, {53, 5}, {59, 5}, {61, 1}, {67,  1}, {71, 5}, {73, 1}, {79, 1}, . ., so a(n) = 53, 29, 67, 37 for n = 1, 2, 3, 4 and a(7) = 5.
		

References

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

Crossrefs

Programs

  • Mathematica
    i = 2; While[ Mod[ Prime[i] - Prime[i - 1], 6] != 0 || Mod[ Prime[i + 1] - Prime[i], 6] != 0, i++]; T = {Prime[i]}; Do[j = 3; While[ ! (Product[ Mod[ Prime[k + 1] - Prime[k], 6], {k, j, j + n}] != 0 && (Mod[ Prime[j] - Prime[j - 1], 6] == 0 || j == 3) && Mod[ Prime[j + n + 2] - Prime[j + n + 1], 6] == 0), j++]; T = Append[T, Prime[j]], {n, 0, 16}]; T

Formula

a(n) = A289119(n) if and only if n > 1 and A289119(n) < A289119(n+1).

Extensions

a(19)-a(33) from Giovanni Resta, Jun 29 2017
Showing 1-2 of 2 results.