OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..9999
MAPLE
F:= proc(dmax) local R, count, x, N, L, d, i, v, p;
count:= 0: x:= 1/8: N:= 10^dmax:
for p from 0 while count < N do
x:= 8*x;
L:= convert(x, base, 10);
for d from 1 to min(dmax, nops(L)) do
for i from 1 to nops(L)-d+1 do
v:= add(L[j]*10^(j-i), j=i..i+d-1);
if not assigned(R[v]) then count:= count+1; R[v]:= p fi
od od od;
seq(R[v], v=0..N-1);
end proc:
F(2); # Robert Israel, Dec 25 2019
MATHEMATICA
Table[k = 0; While[ StringPosition[ ToString[8^k], ToString[n] ] == {}, k++ ]; k, {n, 0, 75} ]
Join[{4, 0}, With[{c=Table[{n, IntegerDigits[8^n]}, {n, 50}]}, Table[ SelectFirst[ c, SequenceCount[ #[[2]], IntegerDigits[k]]>0&], {k, 2, 80}]][[All, 1]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 13 2019 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Jun 24 2001
STATUS
approved