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.

A090318 a(n) = least positive k such that k, k+1, k+2, ..., k+n-1 is a stapled interval of length n, or 0 if no such sequence exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2184, 27829, 27828, 87890, 87890, 171054, 171054, 323510, 127374, 323510, 151062, 151062, 151062, 151061, 151060, 151059, 151058, 7106718, 7106718, 7567747, 7567746, 7567745, 7567744, 7567743, 7567742, 48595315, 48595314, 48595313
Offset: 1

Views

Author

William Rex Marshall, Jan 25 2004

Keywords

Comments

A finite sequence of n consecutive positive integers is called "stapled" if each term in the sequence is not relatively prime to at least one other term in the sequence. Thus a staple joins two terms of the sequence whose gcd is > 1.
It has been proved that stapled intervals of length n >= 17 exist for all n.
From Max Alekseyev, Jul 24 2007: (Start)
An interval is stapled if for every term x there is another term y (different from x) such that gcd(x,y) > 1.
The shortest stapled interval has length 17 and starts with the number 2184.
It is interesting to notice that the intervals [27829,27846] and [27828,27846] are stapled while the interval [27828,27845] is not.
It is clear that a stapled interval [a,b] may not contain a prime number greater than b/2 (as such a prime would be coprime to every other element of the interval).
Together with Bertrand's Postulate this implies a > b/2 or b < 2a. And it follows that
* a stapled interval may not contain prime numbers at all;
* we can determine whether any particular positive integer a is a starting point of some stapled interval. (End)
For n >= 17, a(n) < A034386(n-1) = (n-1)#. - Max Alekseyev, Oct 08 2007

Examples

			The shortest possible stapled sequence is [2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200].
		

References

  • I. Gassko, Common factor graphs of stapled sequences, Proceedings of the Twenty-eighth Southeastern International Conference on Combinatorics, Graph Theory and Computing (Boca Raton, FL, 1997). Congr. Numer. 126 (1997), 163-173.
  • I. Gassko, Stapling and composite coverings of natural numbers, Proceedings of the Twenty-seventh Southeastern International Conference on Combinatorics, Graph Theory and Computing (Baton Rouge, LA, 1996). Congr. Numer. 118 (1996), 109-116.
  • H. L. Nelson, There is a better sequence, Journal of Recreational Mathematics, Vol. 8(1), 1975, pp. 39-43.

Crossrefs

Programs

  • Mathematica
    dd = 41; nn = 10^7; Clear[sp, L]; sp[] = 0; L[] = 0; For[ i = 0, i < PrimePi[dd], ++i, p = Prime[i + 1]; For[ n = 0, n < nn + dd, n += p, If[sp[n] == 0, sp[n] = p]]]; Print["init done"]; For[ n = 1, n <= nn, ++n, m = 1; For[ d = 0, d < dd, ++d, s = sp[n + d]; If[s == 0, Break[]]; If[s > d, m = Max[m, d + s]]; If[d >= m && L[d] == 0, L[d] = n]] ]; Reap[For[ i = 1, i <= dd, ++i, Print["a[", i, "] = ", L[i - 1]]; Sow[L[i - 1]]]][[2, 1]] (* Jean-François Alcover, Mar 26 2013, translated and adapted from Max Alekseyev's program *)

Extensions

Edited by N. J. A. Sloane, Aug 04 2007, Oct 08 2007