2 lcmfact - lcm of positive integers up to specified integer
10 return positive integer
13 Returns the lcm of the integers 1, 2, ..., n.
16 ; for (i = 1; i <= 15; i++) print lcmfact(i),:;
17 1 2 6 12 60 60 420 840 2520 2520 27720 27720 360360 360360 360360
23 NUMBER *qlcmfact(NUMBER *n)
24 void zlcmfact(ZVALUE z, ZVALUE *dest)
29 ## Copyright (C) 1999 Landon Curt Noll
31 ## Calc is open software; you can redistribute it and/or modify it under
32 ## the terms of the version 2.1 of the GNU Lesser General Public License
33 ## as published by the Free Software Foundation.
35 ## Calc is distributed in the hope that it will be useful, but WITHOUT
36 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
37 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
38 ## Public License for more details.
40 ## A copy of version 2.1 of the GNU Lesser General Public License is
41 ## distributed with calc under the filename COPYING-LGPL. You should have
42 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
43 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
45 ## @(#) $Revision: 30.1 $
46 ## @(#) $Id: lcmfact,v 30.1 2007/03/16 11:10:42 chongo Exp $
47 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lcmfact,v $
49 ## Under source code control: 1995/12/18 12:34:57
50 ## File existed as early as: 1995
52 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
53 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/