OFFSET
0,3
COMMENTS
The number of 1's in the base 3 representation of any even(odd) number is even(odd).
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
MAPLE
seq(numboccur(1, convert(2^n, base, 3)), n=0..100); # Robert Israel, Apr 04 2018
MATHEMATICA
Table[DigitCount[2^n, 3, 1], {n, 0, 120}] (* Harvey P. Dale, Mar 14 2011 *)
PROG
(PARI) a(n) = #select(x->(x==1), digits(2^n, 3)); \\ Michel Marcus, Apr 04 2018
CROSSREFS
KEYWORD
base,nonn
AUTHOR
STATUS
approved