%I #15 Jan 21 2019 20:06:41
%S 1,2,4,8,10,20,22,40,80,100,101,103,107,110,111,113,117,130,131,133,
%T 137,170,171,173,177,200,202,206,220,260,301,305,310,311,313,317,331,
%U 350,371,400,404,440,503,530,602,620,701,709,710,711,713,717,731,771,790,800,808,880,907,970,1000,1001,1003,1007,1010,1012,1016
%N Numbers with property that the digital sum plus the product of the digits is a power of 2.
%e 371 is in the sequence because (3+7+1) + (3*7*1) = 11 + 21 = 32 = 2^5.
%e 116291 is in the sequence because (1+1+6+2+9+1) + (1*1*6*2*9*1) = 20 + 108 = 128 = 2^7.
%p A007953 := proc(n) add(d,d=convert(n,base,10)) ; end proc:
%p A007954 := proc(n) mul(d,d=convert(n,base,10)) ; end proc:
%p A061762 := proc(n) A007953(n)+A007954(n) ; end proc:
%p isA000079 := proc(n) if n < 1 then false; elif n = 1 then true; else if type(n,'even') then is( nops(numtheory[factorset](n)) = 1) ; else false; end if; end if; end proc:
%p isA185400 := proc(n) isA000079(A061762(n)) ; end proc:
%p for n from 1 to 1300 do if isA185400(n) then printf("%a,",n) ; end if; end do: # _R. J. Mathar_, Feb 08 2011
%t pwrs2Q[n_]:=Module[{idn=IntegerDigits[n],x,y},x=Total[idn]+Times@@idn;y=Round[Log[x]/Log[2]];2^y==x]
%t Select[Range[1100],pwrs2Q] (* _Harvey P. Dale_, Feb 16 2011 *)
%Y Cf A061762.
%K nonn,base
%O 1,2
%A _Michel Lagneau_, Feb 03 2011
|