OFFSET
0,2
LINKS
Robert Israel, Table of n, a(n) for n = 0..1000
MAPLE
f:= proc(n) numboccur(1, convert(3^n, base, 10)) end proc:
N:= 100: # for a(0) .. a(N)
V:= Array(0..N): count:= 0:
for k from 1 while count <= N do
v:= f(k);
if v <= N and V[v] = 0 then V[v]:= k; count:= count+1; fi
od:
convert(V, list); # Robert Israel, Sep 07 2023
MATHEMATICA
a = {}; Do[k = 1; While[ Count[ IntegerDigits[3^k], 1] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
EXTENSIONS
Name corrected by Jon E. Schoenfield, Jun 26 2018
STATUS
approved