OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
Mathematics StackExchange, Is sum of digits of 3^1000 divisible by 7?
EXAMPLE
a(3) = 30 is in the sequence because 3^30 = 205891132094649 has sum of digits 63, which is divisible by 7.
MAPLE
select(n -> convert(convert(3^n, base, 10), `+`) mod 7 = 0, [$1..1000]);
MATHEMATICA
Select[Range[600], Divisible[Total[IntegerDigits[3^#]], 7]&] (* Harvey P. Dale, Mar 01 2018 *)
PROG
(PARI) isok(n) = !(sumdigits(3^n) % 7); \\ Michel Marcus, Sep 27 2017
(Python)
from __future__ import division
A292931_list = [n for n in range(1000) if not sum(int(d) for d in str(3**n)) % 7] # Chai Wah Wu, Sep 28 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Sep 27 2017
STATUS
approved