

A104320


Number of zeros in ternary representation of 2^n.


8



0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 1, 1, 1, 4, 1, 0, 4, 2, 3, 3, 3, 3, 3, 7, 7, 9, 5, 6, 6, 4, 4, 3, 5, 6, 7, 9, 9, 10, 6, 6, 9, 9, 8, 9, 8, 7, 13, 12, 13, 9, 5, 9, 8, 6, 16, 13, 9, 10, 11, 11, 7, 14, 13, 13, 9, 12, 14, 15, 15, 11, 11, 17, 15, 19, 14, 19, 12, 18, 15, 11, 10, 16, 15, 14, 14, 13, 17, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,9


COMMENTS



LINKS



FORMULA



EXAMPLE

n=13: 2^13=8192 > '102020102', a(13) = 4.


MAPLE

f:= n > numboccur(0, convert(2^n, base, 3)):


MATHEMATICA

Table[DigitCount[2^n, 3, 0], {n, 0, 90}] (* Harvey P. Dale, May 06 2014 *)


PROG

(PARI) a(n) = my(d=vecsort(digits(2^n, 3))); #setintersect(d, vector(#d)) \\ Felix Fröhlich, Nov 17 2019
(Magma) [Multiplicity(Intseq(2^n, 3), 0):n in [0..90]]; // Marius A. Burtea, Nov 17 2019


CROSSREFS



KEYWORD

nonn,base


AUTHOR



STATUS

approved



