OFFSET
1,3
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
select(t -> convert(convert(3^t, base, 10), `+`)::odd, [$0..1000]); # Robert Israel, Jun 28 2017
MATHEMATICA
Select[Range[0, 121], Mod[ Plus @@ IntegerDigits[3^# ], 2] == 1 &] (* Ray Chandler, Jun 10 2006 *)
Select[Range[0, 200], OddQ[Total[IntegerDigits[3^#]]]&] (* Harvey P. Dale, Dec 30 2021 *)
PROG
(PARI) isok(n) = (sumdigits(3^n) % 2) == 1; \\ Michel Marcus, Jun 28 2017
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov, May 22 2006
STATUS
approved