login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A206286
Nonprime numbers starting with a digit 1.
3
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,2
COMMENTS
Complement of A045707 with respect to A131835. Supersequence of A206288.
MATHEMATICA
Select[Range[200], ! PrimeQ[#] && IntegerDigits[#][[1]] == 1 &] (* T. D. Noe, Feb 13 2012 *)
PROG
(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
CROSSREFS
Cf. A045707 (primes with first digit 1), A131835 (numbers starting with a digit 1).
Cf. A206288.
Sequence in context: A099103 A208271 A094879 * A116023 A062408 A127653
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Feb 12 2012
STATUS
approved