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.

A206286 Nonprime numbers starting with a digit 1.

Original entry on oeis.org

1, 10, 12, 14, 15, 16, 18, 100, 102, 104, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 129, 130, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 152, 153, 154, 155, 156, 158
Offset: 1

Views

Author

Jaroslav Krizek, Feb 12 2012

Keywords

Comments

Complement of A045707 with respect to A131835. Supersequence of A206288.

Crossrefs

Cf. A045707 (primes with first digit 1), A131835 (numbers starting with a digit 1).
Cf. A206288.

Programs

  • Mathematica
    Select[Range[200], ! PrimeQ[#] && IntegerDigits[#][[1]] == 1 &] (* T. D. Noe, Feb 13 2012 *)
  • Python
    from sympy import primepi
    def A206286(n):
        def f(x): return n-1+x+((m:=10**(l:=len(str(x))-1))-(k:=min((m<<1)-1,x))-primepi(m-1)+primepi(k))-sum((m:=10**i)+primepi(m-1)-primepi((m<<1)-1) for i in range(l))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Dec 10 2024