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.

A164510 First differences of A071904 (Odd composite numbers).

Original entry on oeis.org

6, 6, 4, 2, 6, 2, 4, 6, 4, 2, 4, 2, 6, 2, 4, 6, 2, 4, 4, 2, 4, 2, 2, 4, 6, 6, 4, 2, 2, 2, 2, 2, 4, 4, 2, 6, 2, 2, 2, 6, 2, 4, 2, 4, 4, 2, 4, 2, 6, 2, 2, 2, 6, 6, 2, 2, 2, 2, 4, 2, 2, 2, 2, 4, 6, 4, 2, 6, 2, 2, 2, 4, 2, 4, 2, 4, 2, 6, 2, 4, 6, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 6, 4, 2, 2, 2, 2, 2, 4, 2, 4, 2, 2, 2, 6
Offset: 1

Views

Author

Zak Seidov, Aug 14 2009

Keywords

Comments

Are all terms <=6?
This is A067970 without its first term. [R. J. Mathar, Aug 17 2009]
Yes, all terms are at most 6. For a value of 8, we have to have p, p+2, p+4 all prime, and this is possible only for p=3. As a result, 1 would have to be an odd composite number, which it is not. Therefore all terms are <=6. [J. Lowell, Aug 17 2009]

Crossrefs

Cf. A071904.

Programs

  • Mathematica
    Differences@ Select[Range[1, 360, 2], CompositeQ] (* Michael De Vlieger, Aug 29 2025 *)
  • Python
    from sympy import primepi, isprime
    def A164510(n):
        m, k = n, primepi(n+1) + n + (n+1>>1)
        while m != k:
            m, k = k, primepi(k) + n + (k>>1)
        for d in range(2, 7, 2):
            if not isprime(m+d):
                return d # Chai Wah Wu, Aug 02 2024