login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers n such that 2^n and 3^n have even digit sum.
9

%I #9 Apr 12 2021 17:47:20

%S 6,15,33,37,42,43,44,46,47,50,54,55,57,58,64,67,70,71,77,82,83,84,85,

%T 90,95,102,106,107,112,116,120,122,126,129,135,136,138,140,142,149,

%U 154,161,168,170,173,176,178,179,180,181,185,193,195,198,200,207,209,210,217

%N Numbers n such that 2^n and 3^n have even digit sum.

%H Robert Israel, <a href="/A118734/b118734.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= proc(n) convert(convert(2^n,base,10),`+`)::even and convert(convert(3^n,base,10),`+`)::even end proc:

%p select(filter, [$1..1000]); # _Robert Israel_, Apr 12 2021

%t Select[Range[220], And @@ ((Mod[ Plus @@ IntegerDigits[ # ], 2] == 0 &) /@ {2^#, 3^#}) &] (* _Ray Chandler_, Jun 10 2006 *)

%Y Cf. Intersection of A118730 and A118733.

%K base,nonn

%O 1,1

%A _Zak Seidov_, May 22 2006

%E Extended by _Ray Chandler_, Jun 10 2006