login
A063556
Smallest k such that 3^k has exactly n 1's in its decimal representation.
1
1, 4, 11, 17, 32, 42, 85, 55, 84, 100, 115, 120, 162, 128, 202, 111, 214, 267, 260, 316, 321, 319, 295, 307, 298, 331, 384, 404, 451, 454, 490, 488, 449, 521, 528, 511, 575, 617, 584, 604, 590, 628, 663, 619, 668, 807, 776, 812, 718, 788, 856, 796, 956, 960
OFFSET
0,2
LINKS
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
Sequence in context: A003146 A063237 A026381 * A133725 A050395 A368424
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
EXTENSIONS
Name corrected by Jon E. Schoenfield, Jun 26 2018
STATUS
approved