login
A064003
Numbers whose product of decimal digits equals its sum of binary digits.
1
1, 12, 13, 114, 115, 123, 131, 141, 151, 212, 231, 1122, 1611, 1911, 2121, 3211, 3311, 11124, 11215, 11251, 11421, 12114, 12311, 12411, 13121, 14121, 14211, 15211, 21114, 21212, 21221, 21411, 22121, 22211, 26111, 52111, 111118, 111119, 111133, 111142, 111241
OFFSET
1,2
COMMENTS
The number of terms with d digits, for d = 1,...,20 is 1, 2, 8, 6, 19, 37, 49, 95, 152, 240, 374, 528, 748, 1174, 1607, 2415, 3309, 4687, 7202, 9357. - Giovanni Resta, Mar 28 2013
LINKS
Harry J. Smith and Donovan Johnson, Table of n, a(n) for n = 1..1000 (first 200 terms from Harry J. Smith)
FORMULA
{ k : A000120(k) = A007954(k) }.
EXAMPLE
Product of digits of 15211 is 10, 15211 = 11101101101011 in binary with 10 "1's", hence 15211 is in the sequence.
MATHEMATICA
Select[Range[120000], Times@@IntegerDigits[#]==Total[ IntegerDigits[#, 2]]&] (* Harvey P. Dale, Mar 01 2012 *)
(* dig[x] generates all terms with x digits *) dig[nd_] := Block[{dec, w}, dec[p_, n_] := If[Length@p == nd, n==1 && AppendTo[w, p], Do[If[Mod[n, x] == 0, dec[Append[p, x], n/x]], {x, Max[Max@p, 1], 9}]]; Sort@Flatten@Table[w = {}; dec[{}, nb]; Select[FromDigits /@ Flatten[Permutations /@ w, 1], Total@ IntegerDigits[#, 2] == nb &], {nb, Ceiling@Log[2, 10^nd]}]]; (* Giovanni Resta, Mar 28 2013 *)
PROG
(PARI) isok(k) = { vecprod(digits(k)) == hammingweight(k) } \\ Harry J. Smith, Sep 05 2009
CROSSREFS
Subsequence of A052382.
Sequence in context: A041306 A058952 A058950 * A135123 A129476 A243361
KEYWORD
nonn,base
AUTHOR
Benoit Cloitre, Jun 05 2002
STATUS
approved