cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A118733 Numbers k such that 3^k has even digit sum.

This page as a plain text file.
%I A118733 #27 May 20 2025 08:09:50
%S A118733 6,7,8,12,15,19,23,24,28,29,33,37,38,40,42,43,44,46,47,49,50,54,55,56,
%T A118733 57,58,64,67,70,71,72,75,77,82,83,84,85,88,90,93,94,95,96,97,102,104,
%U A118733 106,107,109,110,111,112,116,120,122,125,126,129,132,135,136,138,139
%N A118733 Numbers k such that 3^k has even digit sum.
%H A118733 Clinton Walker, <a href="/A118733/b118733.txt">Table of n, a(n) for n = 1..10000</a>
%t A118733 Select[Range[140], Mod[ Plus @@ IntegerDigits[3^# ], 2] == 0 &] (* _Ray Chandler_, Jun 10 2006 *)
%t A118733 Select[Range[150],EvenQ[Total[IntegerDigits[3^#]]]&] (* _Harvey P. Dale_, Mar 12 2013 *)
%o A118733 (Python)
%o A118733 from gmpy2 import digits
%o A118733 def ok(n): return sum(map(int, digits(3**n)))&1 == 0
%o A118733 print([k for k in range(140) if ok(k)]) # _Michael S. Branicky_, May 11 2025
%Y A118733 Cf. A004166, A118730, A118734.
%K A118733 nonn,base
%O A118733 1,1
%A A118733 _Zak Seidov_, May 22 2006