|
| |
|
|
A064003
|
|
Numbers n such that 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
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,2
|
|
|
LINKS
| Harry J. Smith, Table of n, a(n) for n=1,...,200
|
|
|
FORMULA
| n such that A000120(n)=A007954(n)
|
|
|
EXAMPLE
| Product of digits of 15211 is 10, 15211 = 11101101101011 in binary with 10 "1's", hence 15211 is in the sequence.
|
|
|
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)) ) } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Sep 05 2009]
|
|
|
CROSSREFS
| Sequence in context: A041306 A058952 A058950 * A135123 A129476 A037278
Adjacent sequences: A064000 A064001 A064002 * A064004 A064005 A064006
|
|
|
KEYWORD
| nonn,base
|
|
|
AUTHOR
| Benoit Cloitre (benoit7848c(AT)orange.fr), Jun 05 2002
|
| |
|
|