OFFSET
0,2
COMMENTS
All terms a(n), n > 1, are divisible by 9. - M. F. Hasler, Sep 27 2017
LINKS
Michel Marcus, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Vincenzo Librandi)
Albert Frank, Solutions of International Contest Of Logical Sequences, 2002 - 2003. (The original Contest page without solutions was removed but remains available on web.archive.org.)
FORMULA
MATHEMATICA
Total[IntegerDigits[#]]&/@(3^Range[0, 60]) (* Harvey P. Dale, Mar 03 2013 *)
Table[Total[IntegerDigits[3^n]], {n, 0, 60}] (* Vincenzo Librandi, Oct 08 2013 *)
PROG
(PARI) a(n)=sumdigits(3^n); \\ Michel Marcus, Nov 01 2013
(Python)
def a(n): return sum(map(int, str(3**n)))
print([a(n) for n in range(61)]) # Michael S. Branicky, Apr 25 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Edited by M. F. Hasler, May 18 2017
STATUS
approved