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.

A185400 Numbers with property that the digital sum plus the product of the digits is a power of 2.

Original entry on oeis.org

1, 2, 4, 8, 10, 20, 22, 40, 80, 100, 101, 103, 107, 110, 111, 113, 117, 130, 131, 133, 137, 170, 171, 173, 177, 200, 202, 206, 220, 260, 301, 305, 310, 311, 313, 317, 331, 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
Offset: 1

Views

Author

Michel Lagneau, Feb 03 2011

Keywords

Examples

			371 is in the sequence because (3+7+1) + (3*7*1) = 11 + 21 = 32 = 2^5.
116291 is in the sequence because (1+1+6+2+9+1) + (1*1*6*2*9*1) = 20 + 108 = 128 = 2^7.
		

Crossrefs

Cf. A061762.

Programs

  • Maple
    A007953 := proc(n) add(d,d=convert(n,base,10)) ; end proc:
    A007954 := proc(n) mul(d,d=convert(n,base,10)) ; end proc:
    A061762 := proc(n) A007953(n)+A007954(n) ; end proc:
    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:
    isA185400 := proc(n) isA000079(A061762(n)) ; end proc:
    for n from 1 to 1300 do if isA185400(n) then printf("%a,",n) ; end if; end do: # R. J. Mathar, Feb 08 2011
  • Mathematica
    pwrs2Q[n_]:=Module[{idn=IntegerDigits[n],x,y},x=Total[idn]+Times@@idn;y=Round[Log[x]/Log[2]];2^y==x]
    Select[Range[1100],pwrs2Q]  (* Harvey P. Dale, Feb 16 2011 *)