Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'programming help, finding factors of LCM' topicStudent Support Forum > General > Archives > "programming help, finding factors of LCM"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
07/08/13 6:11pm

Find the list of numbers

In[1]:= Map[Floor[1 + Log[#, 6]] &, Select[Range[2, 6], PrimeQ]]

Out[1]= {3, 2, 2}

and the product

In[2]:= Times @@ Map[Floor[1 + Log[#, 6]] &, Select[Range[2, 6], PrimeQ]]

Out[2]= 12

and the sum

In[3]:= Plus @@ Map[Floor[1 + Log[#, 6]] &, Select[Range[2, 6], PrimeQ]]

Out[3]= 7

URL: ,

Subject (listing for 'programming help, finding factors of LCM')
Author Date Posted
programming help, finding factors of LCM JD 07/08/13 5:07pm
Re: programming help, finding factors of LCM Bill Simpson 07/08/13 6:11pm
< Previous CommentHelp | Reply To Comment | Reply To Topic