login
Numbers whose largest decimal digit is 6.
5

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

%S 6,16,26,36,46,56,60,61,62,63,64,65,66,106,116,126,136,146,156,160,

%T 161,162,163,164,165,166,206,216,226,236,246,256,260,261,262,263,264,

%U 265,266,306,316,326,336,346,356,360,361,362,363,364,365,366,406,416,426

%N Numbers whose largest decimal digit is 6.

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

%C Number of terms less than 10^n is 7^n - 6^n.

%C Prime terms are in A106096.

%H Muniru A Asiru, <a href="/A283609/b283609.txt">Table of n, a(n) for n = 1..5000</a>

%t Select[Range[1000], Max[IntegerDigits[#]] == 6 &] (* _Giovanni Resta_, Mar 19 2017 *)

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

%o (PARI) for(n=1, 500, if(vecmax(digits(n))==6, print1(n,", "))) \\ _Indranil Ghosh_, Mar 19 2017

%o (Python)

%o from sympy.ntheory.factor_ import digits

%o print([n for n in range(1, 501) if max(digits(n)[1:])==6]) # _Indranil Ghosh_, Mar 19 2017

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

%Y Cf. A054055, A106096.

%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), this sequence (k = 6), A283610 (k = 7), A283611 (k = 8), A011539 (k = 9).

%K nonn,base

%O 1,1

%A _Jaroslav Krizek_, Mar 19 2017