OFFSET
1,1
COMMENTS
Numbers n such that A054054(n) = 8.
Prime terms are in A020472. - Corrected by Robert Israel, Apr 05 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
From Robert Israel, Apr 05 2017: (Start)
a(2*j+2^(m+1)-m-3) = 10*a(j+2^m-m-1)+8 for j=1..2^m-1.
a(2*j+2^(m+1)-m-2) = 10*a(j+2^m-m-1)+9 for j=1..2^m-1.
a(2^(m+1)-m-2) = 10^m-2. (End)
MAPLE
F:= proc(d) local r; # to get all terms with d digits
r:= 8*(10^d-1)/9;
op(sort(convert(map(t -> r + add(10^(j-1), j=t), combinat:-powerset(d) minus {{$1..d}}), list)))
end proc:
map(F, [$1..5]); # Robert Israel, Apr 05 2017
MATHEMATICA
Flatten@ Table[ Most[ FromDigits /@ Tuples[{8, 9}, k]], {k, 5}] (* Giovanni Resta, Mar 24 2017 *)
PROG
(Magma) [n: n in [1..100000] | Minimum(Setseq(Set(Sort(&cat[Intseq(n)])))) eq 8]
(PARI) isok(n) = vecmin(digits(n)) == 8; \\ Michel Marcus, Mar 25 2017
(Python)
print([n for n in range(8, 10**6) if min(str(n))=='8']) # Indranil Ghosh, Apr 06 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Mar 24 2017
STATUS
approved