login
Numbers having one 8 in base 10.
12

%I #22 Aug 18 2021 09:30:03

%S 8,18,28,38,48,58,68,78,80,81,82,83,84,85,86,87,89,98,108,118,128,138,

%T 148,158,168,178,180,181,182,183,184,185,186,187,189,198,208,218,228,

%U 238,248,258,268,278,280,281,282,283,284,285,286,287,289,298,308,318

%N Numbers having one 8 in base 10.

%H Enrique PĂ©rez Herrero, <a href="/A043521/b043521.txt">Table of n, a(n) for n = 1..2000</a>

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.

%t Select[Range[300],DigitCount[#,10,8]==1&] (* _Harvey P. Dale_, Jan 06 2012 *)

%o (PARI) is(n)=my(d=digits(n)); sum(i=1,#d, d[i]==8)==1 \\ _Charles R Greathouse IV_, Feb 12 2017

%o (Python)

%o def ok(n): return str(n).count('8') == 1

%o print(list(filter(ok, range(320)))) # _Michael S. Branicky_, Aug 18 2021

%Y Subsequence of A011538.

%Y Cf. A043489, A043493, A043497, A043501, A043505, A043509, A043513, A043517, A043525, A011538.

%K nonn,base,easy

%O 1,1

%A _Clark Kimberling_