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.

A344636 Numbers k such that half the numbers from 0 to k inclusive contain the digit "1".

This page as a plain text file.
%I A344636 #31 Jul 28 2021 13:41:11
%S A344636 1,17,23,161,269,271,1457,3397,3419,3421,13121,44685,118097,674909,
%T A344636 674933,1062881
%N A344636 Numbers k such that half the numbers from 0 to k inclusive contain the digit "1".
%C A344636 Andrew Hilton (see Ref) refers to these as "half-one" numbers.
%D A344636 Andrew Hilton, 101 Puzzles to Solve on your Microcomputer, 1984, HARRAP, page 57.
%e A344636 1 is a term since among the numbers 0,1 exactly half contain a digit "1".
%e A344636 17 is a term since among the numbers 0,1,2,...,17 exactly half contain a digit "1".
%t A344636 Select[2Range@2000,Length@Select[Range[0,#-1],MemberQ[IntegerDigits@#,1]&]==#/2&]-1 (* _Giorgos Kalogeropoulos_, Jul 28 2021 *)
%o A344636 (Python 3)
%o A344636 z=1
%o A344636 z_s = str(z)
%o A344636 counts=0
%o A344636 for x in trange (0,100000000000):
%o A344636     x_s = str(x)
%o A344636     if z_s in x_s:
%o A344636         counts += 1
%o A344636     if counts / (x+1) == 0.5:
%o A344636         print(x)
%Y A344636 Cf. A344474, A344634, A343839, A011531, A016189.
%K A344636 nonn,base,fini,full
%O A344636 1,2
%A A344636 _Glen Gilchrist_, May 25 2021