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.

A175839 Smallest runs of n*2-1 consecutive composites.

Original entry on oeis.org

4, 8, 9, 10, 24, 25, 26, 27, 28, 90, 91, 92, 93, 94, 95, 96, 114, 115, 116, 117, 118, 119, 120, 121, 122, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126
Offset: 1

Views

Author

Grant Garcia, Sep 20 2010

Keywords

Comments

Even lengths of runs of composites are omitted, as nontrivial runs always have odd lengths (see A046933).
Run 5 (starting at 114) has 13 consecutive composites and is repeated in runs 6 and 7. Run 8 starts at 524 = A008950(6).

Examples

			Run 1 has length 1; the first composite is 4.
Run 2 has length 3; the first three consecutive composites are 8, 9, and 10.
Run 3 has length 5; the first five consecutive composites are 24, 25, 26, 27, and 28.
4;
8, 9, 10;
24, 25, 26, 27, 28;
90, 91, 92, 93, 94, 95, 96;
114, 115, 116, 117, 118, 119, 120, 121, 122;
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124;
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126;
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    out = []
    run = 1
    for n in range(4, 10000):
        isrun = True
        for o in range(run): isrun *= not isprime(n + o - run)
        if isrun:
            for o in range(run): out.append(n + o - run)
            run += 2
    print(out)