login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064003 Numbers whose product of decimal digits = 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 (list; graph; refs; listen; history; text; internal format)
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) for(n=1, 120000, s=ceil(log(n)/log(10)); b=binary(n); l=length(b); if(sum(i=1, l, component(b, i))==prod(i=0, s-1, floor(n/10^i)-10*floor(n/10^(i+1))), print1(n, ", ")))
(PARI) ProdD(x)= { local(p); p=1; while (x>9 && p>0, p*=(x-10*(x\10)); x\=10); return(p*x) }
SumBD(x)= { local(b); b=binary(x); sum(i=1, length(b), b[i]) }
{ n=0; for (m=1, 10^9, if ((p=ProdD(m))>0 && p==SumBD(m), write("b064003.txt", n++, " ", m); if (n==200, break)) ) } \\ 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 25 14:03 EDT 2024. Contains 375439 sequences. (Running on oeis4.)