login
A118732
Numbers n such that 3^n has odd digit sum.
3
0, 1, 2, 3, 4, 5, 9, 10, 11, 13, 14, 16, 17, 18, 20, 21, 22, 25, 26, 27, 30, 31, 32, 34, 35, 36, 39, 41, 45, 48, 51, 52, 53, 59, 60, 61, 62, 63, 65, 66, 68, 69, 73, 74, 76, 78, 79, 80, 81, 86, 87, 89, 91, 92, 98, 99, 100, 101, 103, 105, 108, 113, 114, 115, 117, 118, 119, 121
OFFSET
1,3
COMMENTS
Numbers n such that A000244(n) is in A054684. - Robert Israel, Jun 28 2017
LINKS
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