Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A068189
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
%I A068189
%S A068189 1,2,3,4,5,6,7,8,9,25,0,26,0,27,35,28,0,29,0,45,37,0,0,38,55,0,39,47,0,
%T A068189 56,0,48,0,0,57,49,0,0,0,58,0,67,0,0,59,0,0,68,77,255,0,0,0,69,0,78,0,
%U A068189 0,0,256,0,0,79,88,0,0,0,0,0,257,0,89,0,0,355,0,0,0,0,258,99,0,0,267,0
%N A068189 Smallest positive number whose product of digits equals n, or a(n)=0 
               if no such number exists, e.g. when n has prime-factor larger than 
               7.
%e A068189 n=2,10,50,250 gives a(n)=2,25,255,2555; n=11,39,78, etc..a(n)=0.
%t A068189 f[x_] := Apply[Times, IntegerDigits[x]] a = Table[0, {256} ]; Do[ b = 
               f[n]; If[b < 257 && a[[b]] == 0, a[[b]] =n], {n, 1, 10000} ]; a
%o A068189 (Python) [From Dmitry Kamenetsky (dkamen(AT)rsise.anu.edu.au), Oct 20 
               2008]
%o A068189 .def convert(n):
%o A068189 ..if (n==1): return 1
%o A068189 ..result=0
%o A068189 ..cur=1
%o A068189 ..while(n>1):
%o A068189 ...found=False
%o A068189 ...for i in range(9,1,-1):
%o A068189 ....if (n%i==0):
%o A068189 .....result+=(cur*i)
%o A068189 .....cur*=10
%o A068189 .....n/=i
%o A068189 .....found=True
%o A068189 .....break
%o A068189 ..
%o A068189 ....if (not found): return 0
%o A068189 ..
%o A068189 ..return result
%o A068189 ..
%o A068189 ..
%o A068189 .N=256
%o A068189 .for n in range(1,N):
%o A068189 ..print n,convert(n)
%Y A068189 Cf. A001222, A002473, A067734, A068183-A068187, A068189-A068191.
%Y A068189 Cf. A085123.
%Y A068189 Sequence in context: A134703 A061862 A007532 this_sequence A069716 A095289 
               A095706
%Y A068189 Adjacent sequences: A068186 A068187 A068188 this_sequence A068190 A068191 
               A068192
%K A068189 base,nonn
%O A068189 1,2
%A A068189 Labos E. (labos(AT)ana.sote.hu), Feb 19 2002

    
page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 4 12:48 EST 2009. Contains 170310 sequences.


AT&T Labs Research