login
Numbers whose largest decimal digit is 8.
5

%I #20 Sep 08 2022 08:46:18

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

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

%U 248,258,268,278,280,281,282,283,284,285,286,287,288,308,318,328,338,348

%N Numbers whose largest decimal digit is 8.

%C Numbers n such that A054055(n) = 8.

%C Number of terms less than 10^n is 9^n - 8^n.

%C Prime terms are in A106094.

%H Robert Israel, <a href="/A283611/b283611.txt">Table of n, a(n) for n = 1..10000</a>

%p f:= proc(n) local L;

%p L:= convert(n,base,9);

%p if not has(L,8) then return NULL fi;

%p add(L[i]*10^(i-1),i=1..nops(L))

%p end proc:

%p map(f, [$8..1000]); # _Robert Israel_, Mar 27 2017

%t Select[Range@ 350, Max@ IntegerDigits@ # == 8 &] (* _Michael De Vlieger_, Mar 25 2017 *)

%o (Magma) [n: n in [1..100000] | Maximum(Setseq(Set(Sort(&cat[Intseq(n)])))) eq 8]

%o (PARI) isok(n) = vecmax(digits(n)) == 8; \\ _Michel Marcus_, Mar 25 2017

%o (GAP) Filtered([1..400],n->Maximum(ListOfDigits(n))=8); # _Muniru A Asiru_, Mar 01 2019

%Y Cf. Sequences of numbers whose largest decimal digit is k (for k = 1..9): A007088 (k = 1), A277964 (k = 2), A277965 (k = 3), A277966 (k = 4), A283608 (k = 5), A283609 (k = 6), A283610 (k = 7), this sequence (k = 8), A011539 (k = 9).

%K nonn,base

%O 1,1

%A _Jaroslav Krizek_, Mar 19 2017