[Question]
  [
There is a rather curious number which shows up sometimes in math problems or riddles. The pseudofactorial(N) is the least (i.e. lowest) common multiple of the numbers 1 through N; in other words, it's the lowest number which has all numbers from 1 through N as factors.
For instance pseudofactorial(7) = 3 \* 4 \* 5 \* 7, which is the same as 7! except that 2 and 6 have been removed because they are contained in other terms. 
Write a program to calculate pseudofactorial(N) and as always, shortest code wins.
Here is a short list for your use. More test cases can be found in the OEIS under [A003418](//oeis.org/A003418).
Factorial:
1. 1
2. 2
3. 6
4. 24
5. 120
6. 720
7. 5040
Pseudofactorial:
1. 1
2. 2
3. 6
4. 12
5. 60
6. 60
7. 420
  
[Answer]
# [Dyalog APL](http://goo.gl/9KrKoM), 3 bytes
```
‚àß/‚ç≥
```
APL beats [Jelly](https://codegolf.stackexchange.com/a/82496/43319)‚ÄΩ
`‚ç≥` 1 though argument
`‚àß/` LCM across
[Answer]
# [Jelly](http://github.com/DennisMitchell/jelly), 4 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
R√¶l/
```
[Try it online!](http://jelly.tryitonline.net/#code=UsOmbC8&input=&args=Nw) or [verify all test cases](http://jelly.tryitonline.net/#code=UsOmbC8Kw4figqw&input=&args=WzEsIDIsIDMsIDQsIDUsIDYsIDdd).
### How it works
```
R√¶l/  Main link. Input: n
R     Range; yield [1, ..., n].
   /  Reduce the range...
 √¶l     by LCM.
```
[Answer]
## Haskell, 20 bytes
```
f x=foldr1 lcm[1..x]
```
Usage example: `map f [1..7]` -> `[1,2,6,12,60,60,420]`.
The `lcm` trick in Haskell.
[Answer]
## Python, 46 bytes
```
g=lambda n,c=0:n<1or(c%n<1)*c or g(n,c+g(n-1))
```
Looking for the multiple `c` of `g(n-1)` directly. I had though before that this method would wrongly find 0 as a multiple of anything, but the `or` short-circuiting or `(c%n<1)*c` will skip `c==0` as well because 0 is Falsey.
---
**50 bytes:**
```
g=lambda n,i=1:n<1or(i*n%g(n-1)<1)*i*n or g(n,i+1)
```
Like [Dennis's solution](https://codegolf.stackexchange.com/a/82501/20260), but as a recursive function. Having computed `g(n-1)`, looks for the smallest multiple `i*n` of `n` that's also a multiple of `g(n-1)`. Really slow.
Thanks to Dennis for 4 bytes by looking at multiples of `n` instead of `g(n-1)`.
[Answer]
# C (x86-64 `gcc -O1`), 52 bytes
```
d(n,k,b,t){for(b=k=1;b;++k)for(t=n,b=0;t;b+=k%t--);}
```
Checks numbers from 1 upwards. For each number, divides it by all numbers from n down to 1, and sums the remainders. Stops when the sum is 0.
Usage:
```
main()
{
    printf("%d\n", d(7)); // outputs 420
}
```
It's not obvious how it returns a value (there is no `return` statement).
The calling convention for x86 says that the function must return its value in the `eax` register. Conveniently, the division instruction `idiv` expects its input in `eax`, and outputs the result in `eax` (quotient) and `edx` (remainder). The last iteration divides `k` by `1`, so `eax` will contain the right value when the function exits.
This only works with gcc and `-O1` optimization option (otherwise, it outputs different results ‚Äî usually `0` or random-looking numbers, but sometimes `421`, while the correct answer is `420`).
[Try it with Compiler Explorer](https://godbolt.org/#g:!((g:!((g:!((g:!((h:codeEditor,i:(filename:%271%27,fontScale:14,fontUsePx:%270%27,j:1,lang:___c,selection:(endColumn:2,endLineNumber:5,positionColumn:2,positionLineNumber:5,selectionStartColumn:2,selectionStartLineNumber:5,startColumn:2,startLineNumber:5),source:%27d(n,k,b,t)%7Bfor(b%3Dk%3D1%3Bb%3B%2B%2Bk)for(t%3Dn,b%3D0%3Bt%3Bb%2B%3Dk%25t--)%3B%7D%0Aint+main()%0A%7B%0A++++printf(%22%25d%22,+d(7))%3B%0A%7D%27),l:%275%27,n:%270%27,o:%27C+source+%231%27,t:%270%27)),k:48.11846689895471,l:%274%27,n:%270%27,o:%27%27,s:0,t:%270%27),(g:!((h:compiler,i:(compiler:cg85,deviceViewOpen:%271%27,filters:(b:%270%27,binary:%271%27,binaryObject:%271%27,commentOnly:%270%27,demangle:%270%27,directives:%270%27,execute:%270%27,intel:%270%27,libraryCode:%270%27,trim:%271%27),flagsViewOpen:%271%27,fontScale:14,fontUsePx:%270%27,j:2,lang:___c,libs:!(),options:%27-O1%27,selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:%275%27,n:%270%27,o:%27+x86-64+gcc+8.5+(Editor+%231)%27,t:%270%27)),header:(),k:51.88153310104531,l:%274%27,n:%270%27,o:%27%27,s:0,t:%270%27)),l:%272%27,m:50,n:%270%27,o:%27%27,t:%270%27),(g:!((h:output,i:(compilerName:%276502-c%2B%2B+11.1.0%27,editorid:1,fontScale:14,fontUsePx:%270%27,j:2,wrap:%271%27),l:%275%27,n:%270%27,o:%27Output+of+x86-64+gcc+8.5+(Compiler+%232)%27,t:%270%27)),header:(),l:%274%27,m:50,n:%270%27,o:%27%27,s:0,t:%270%27)),l:%273%27,n:%270%27,o:%27%27,t:%270%27)),version:4)
[Answer]
# Python + SymPy, 45 bytes
```
import sympy
lambda n:sympy.lcm(range(1,n+1))
```
Fairly self-explanatory.
---
# Python 2, ~~57~~ 54 bytes
```
i=r=input();exec't=r\nwhile r%i:r+=t\ni-=1;'*r;print r
```
Test it on [Ideone](http://ideone.com/qmwpbR).
### How it works
The input is stored in variables **i** and **r**.
`exec` executes the following code **r** times.
```
t=r
while r%i:r+=t
i-=1
```
While **i** varies from **r** to **1**, we add the initial value of **r** (stored in **t**) as many times as necessary to **r** itself to create a multiple of **i**. The result is, obviously, a multiple of **t**.
The final value of **r** is thus a multiple of all integers in the range **[1, ..., n]**, where **n** is the input.
[Answer]
# J, 9 bytes
```
[:*./1+i.
```
Straight-forward approach. Creates the range of numbers `[0, ..., n-1]`, then adds one to each, and reduce it using the LCM.
## Usage
```
   f =: [:*./1+i.
   f 7
420
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 4 bytes
```
:&Zm
```
[**Try it online!**](http://matl.tryitonline.net/#code=OiZabQ&input=Nw)
### Explanation
```
:      % Take input N implicitly. Generate range [1 2 ... N]
&Zm    % LCM of the numbers in that array. Display implicitly
```
[Answer]
# Mathematica, 13 bytes
```
LCM@@Range@#&
```
[Answer]
# Julia, 11 bytes
```
!n=lcm(1:n)
```
[Try it online!](http://julia.tryitonline.net/#code=IW49bGNtKDE6bikKCmZvciBuIGluIDE6NwogICAgcHJpbnRsbighbikKZW5k&input=)
[Answer]
# Pyth - 8 bytes
Checks all numbers till it finds one that is divisible by `[1..N]`.
```
f!s%LTSQ
```
[Test Suite](http://pyth.herokuapp.com/?code=f%21s%25LTSQ&test_suite=1&test_suite_input=1%0A2%0A3%0A4%0A5%0A6%0A7&debug=0).
[Answer]
# Octave, 27 bytes
```
@(x)lcm(1,num2cell(1:x){:})
```
Creates an anonymous function that can be invoked as `ans(N)`.
[**Online Demo**](http://ideone.com/tlS3Jn)
**Explanation**
This solution creates a list of all numbers between `1` and `x` (`1:x`), converts them to a cell array with `num2cell`. Then the `{:}` indexing creates a comma-separated-list which is passed to `lcm` as multiple input arguments to compute the least common multiple. A 1 is always passed as the first argument to `lcm` because `lcm` always needs at least two input arguments.
[Answer]
# MATLAB, 49 bytes
```
@(x)find(~any(bsxfun(@rem,1:prod(1:x),(1:x)')),1)
```
[Answer]
# [Perl 6](http://perl6.org), 13 bytes
```
{[lcm] 1..$_}
```
Anonymous code block that creates a Range from 1 to the input (inclusive), and then reduces that with `&infix:<lcm>`.
### Example:
```
#! /usr/bin/env perl6
use v6.c;
my &postfix:<p!> = {[lcm] 1..$_}
say 1p!; # 1
say 2p!; # 2
say 3p!; # 6
say 4p!; # 12
say 5p!; # 60
say 6p!; # 60
say 7p!; # 420
say 10000p!; # 5793339670287642968692270879...
# the result from this is 4349 digits long
```
[Answer]
# [Arturo](https://arturo-lang.io), 13 bytes
```
$=>[[[email protected]](/cdn-cgi/l/email-protection)&]
```
[Try it](http://arturo-lang.io/playground?vPpQ2R)
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 5 bytes
```
fa~‚ü¶‚ÇÅ
```
[Try it online!](https://tio.run/##AT4Awf9icmFjaHlsb2cy/3t3IiAtPiAidz9@4oaw4oKC4bqJfeG1kP9mYX7in6bigoH//1sxLDIsMyw0LDUsNiw3XQ "Brachylog ‚Äì Try It Online")
Reversed I/O.
```
 a       An affix of
f        the list of the output's factors
  ~‚ü¶‚ÇÅ    is [1 .. n].
```
Essentially a specialization of [my basic LCM solution `f‚äáp~d`](https://codegolf.stackexchange.com/a/185353/85334): ranges are duplicate-free, so they don't need to be deduplicated; ranges are ascending, so they don't need to be permuted; ranges are necessarily contiguous prefixes of the list of factors, so `‚äá` can be replaced by the evidently much more performant `a`.
[Answer]
# [Nibbles](http://golfscript.com/nibbles/index.html), 5.5 bytes
```
/|,~~+.,@%@
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m708LzMpKSe1eMGCpaUlaboWq_VrdOrqtPV0HFQdICJQiQULzSEMAA)
```
/|,~~+.,@%@
/|,~        Find the first positive integer k such that
     +      the sum
      .,@   for i from 1 to n
         %@ of k mod i
    ~       is zero
```
[Answer]
# Regex `üêá` (ECMAScript+`(?*)x*+`[RME](https://github.com/Davidebyzero/RegexMathEngine) / PCRE2 v10.35+), ~~60~~ ~~59~~ 54 bytes
```
^((?*(?=(xx+?)\2*$|)((?=x\2)(?=(x+)(\4+$))\5)*+x+)x)*$
```
Takes its input in unary, as a string of `x` characters whose length represents the number. Returns its output as the number of ways the regex can match. (The rabbit emoji indicates this output method.)
[Attempt This Online!](https://ato.pxeger.com/run?1=hVbNbttGED4W0FOsGdfeJalUVBrDEM0Iji3ABhI7UGQ0jaUSNLmUFqGWBLmMZbe-9gF67aWH9pgHSo99jV46-yOJtgSUsKTd2Zlv5-eboX__EhdZXclPOI3jL9dWOyviknbbh9bk6_BZQlPGKXp3Mhx0w5PL00F4dXE-Cn84Px2docPWM8bjrE4oOlJGz2evWvEsKlFYXE9QgIbW69vbTzcv6h_v7j6MZge3M_xXLdL24deDnzDu27gf4MXC6ZNx1979hYAoWIy7RIkdgsffO7uEjF8S24Htgti72vrvb_4lT4EtF9lFEBaO5ze8qkTJ-FS6tZaxHKQ0mr_a0HvVYlygApYipGWZlzjOeSWQCsme06qKppSgnyuR9HoxaKCjI2TEcqnklCeZj0oq6pIjz3_YwJT7OE-oi27yPEN5kEZZJWHVNQbuuvvyYOK3EDwsRVhlN5xSgxEaLaxxsC7P1cnZ8fDQJubQRRW7p3mKV45_t5Q09Akh6hb54Bz1dRBxXgvUQ6tAiQzPUmZIedBD1pPglbFlgZU15hZZ5SMFas10JKuktB5aNa_YlNMEZTmf6q-IV7e09FXC5ndhHGUZuGFiN7vwJsvjT8iOXfQ5Zwmyk0hEkDuZJLlEQYCwPLHJ3hqDGGzHWVWmYyozjxjHAKAcLK6BCBnluCBtbxJ0fB2CZgcq4sDC_Z7lw8oJCv1jAVtP4LNDQF4D4otuKKCoYCvhp7BQ0E0gxotaSHMVGJQQ2SVd7ueRiGehisVerzVaSas6E64ugW-68v35x4GSpGlF4RDihRCmYvZIwc4_01iAlakEdOfy_nnBMooNKd6_Gw1JET-PQ3AWE9dgfBwML8PRYPj2_OJ4NDhdigcfRoOLU7nfUz6ZX-NJh6wZvFMCAU3um92gvo1eI_RgIxsh7CNBw7TM52ERCUFLjktg-cXVmzcGoGkDrSvoQkASl6tg27mBxRsoEMGKgksIt8FLdxvPngLoqzI2Z02Qtkf8hlJCC_G_SiWN67JiOd-qqK5N8xKp6XK_Yi5MjAzmN9aNzLiruUf8JeNVecCEdyA9kcgZVgrL8kP9ueeiIq_gWJ_A-yDB--19c6l8uCdzCzo7QZPnvR6Xwv4WXOQofQd5BAYG76yx9KyV13F6q3fX3HO8iQ_DZg6ZwJWL9hf70jFIUAWHk6Bhv0oCC7jswaOAez5yHNaMeEnKe4LAKXkJ3h9zCAlSB9qKnym2vk3QP7_-huDVwuBIjxBwrHGb7iXZlI_ZpYjZ7ChwmkFDqL81p2Ftykj8Dec07lEH7e2ZO3YC03XD4eUwvLh8ezw6OSOPDBX9Gu21nBiirOmTOyi8dTZs19Mf5reJeMskl89Da_29rbHSklK8jm-zobXCak-aE1EfwsxYDWwdCbw69P8Af_zZaXsHev0f "C++ (GCC) - Attempt This Online") - PCRE2 v10.40+  
[Try it on replit.com](https://replit.com/@Davidebyzero/regex-Pseudofactorial) - ECMAScript+`(?*)`+`x*+` (RegexMathEngine `-xml,pq`)
The `üêá` output method takes advantage of an aspect of regex that's normally hidden: the backtracking paths that aren't taken. In normal use, all traces of the avenues of potential alternative matches are erased when a final match is found. But in `üêá`, they're all taken and counted, allowing a number to be outputted that's larger than the input. For scalar unary input, this provides a strict superset of the power of returning a number via the matched substring or a capture group (either of which can only return values less than or equal to the input), except that there can be no extra state of returning "no match" (in `üêá`, that just returns \$0\$).
The limitation of having to work within the space of the input is still present. `üêá` can do combinations of multiplication and addition to yield numbers larger than the input, but it can't do subsequent tests on those results (it can only do tests on intermediate results calculated using capture groups and tail). So for example in this problem, the regex can't just directly search for the smallest number that is divisible by all numbers in the range \$[1,n]\$, because that number is not only larger than the input, it's too large even to be able to [emulate using number base arithmetic](https://codegolf.stackexchange.com/questions/198427/shift-right-by-half-a-bit/198428#198428) (and even if that were possible, it would not golf well). So, this regex uses an algorithm different from all of the other answers:
It takes the base prime \$p\$ of every prime power \$p^k\le n\$, and calculates the product of that list of numbers. And because each \$p\$ will occur \$k\$ times in that list, this product is the same as the product of the prime powers themselves would be, if only the largest from each base prime were included.
The prime power portion is based on ~~[my prime powers answer](https://codegolf.stackexchange.com/questions/210162/is-it-almost-prime/219939#219939)~~ [Neil's prime powers answer](https://codegolf.stackexchange.com/a/210191/17216) (which is in turn based on my earliest CGCC answer). In the prime powers challenge, my regex is shorter, but for the purposes of this challenge, his regex (after some extra golfing) allows capturing the smallest prime factor, thus golfing down the overall regex by ~~1~~ 6 bytes.
```
^                       # tail = N = input number
(                       # Loop the following:
    (?*                 # Non-atomic lookahead:
                            # M = tail, which cycles from N down to 1
        (?=(xx+?)\2*$|)     # \2 = smallest prime factor of M if M ‚â• 2;
                            # otherwise, leave \2 unchanged in PCRE, or
                            # unset in ECMAScript
        (
            (?=x\2)         # Keep iterating until tail ‚â§ \2, and because of
                            # what \2 is, this means at the end of the loop,
                            # either tail == \2 (if M is a prime power) or
                            # tail == 1 (if M is not a prime power)
            (?=(x+)(\4+$))  # \4 = {largest proper divisor of tail}
                            #    = tail / {smallest prime factor of tail};
                            # \5 = tail - \4
            \5              # tail = tail - (tail - \4) = \4
        )*+                 # Iterate the above as many times as possible,
                            # minimum zero, and lock in the result using a
                            # possessive quantifier.
        x+                  # Multiply number of possible matches by tail
    )
    x                   # tail -= 1
)*                      # Loop the above a minimum of 0 times
$                       # Assert that at the end of the above loop, tail == 0
```
This even returns a correct value for \$n=0\$, while the earlier 60 byte version did not (and needed to be extended to 63 bytes to do so).
A list of other answers that return \$f(0)=1\$ correctly, complete at the time of this edit: [AWK](https://codegolf.stackexchange.com/a/105788/17216), [Dyalog APL](https://codegolf.stackexchange.com/a/82563/17216), [J](https://codegolf.stackexchange.com/a/82500/17216), [Japt](https://codegolf.stackexchange.com/a/153735/17216), [Julia v0.7+](https://codegolf.stackexchange.com/a/82497/17216) (but it was v0.6 at the time of posting, and didn't support it then), [MATLAB](https://codegolf.stackexchange.com/a/82511/17216), [MATL](https://codegolf.stackexchange.com/a/82498/17216), [Maxima (with functs)](https://codegolf.stackexchange.com/a/105589/17216), [Minkolang (1st answer)](https://codegolf.stackexchange.com/a/82564/17216), [Nibbles](https://codegolf.stackexchange.com/a/259578/17216), [PHP](https://codegolf.stackexchange.com/a/105698/17216), [Pari/GP](https://codegolf.stackexchange.com/a/123275/17216), [Perl 5](https://codegolf.stackexchange.com/a/105579/17216), [Perl 6](https://codegolf.stackexchange.com/a/82537/17216), [Pyth](https://codegolf.stackexchange.com/a/82499/17216), [Python (with SymPy)](https://codegolf.stackexchange.com/a/82501/17216), [Python (with math)](https://codegolf.stackexchange.com/a/258287/17216), [Python](https://codegolf.stackexchange.com/a/82534/17216), [QBIC](https://codegolf.stackexchange.com/a/105620/17216), [Rexx](https://codegolf.stackexchange.com/a/105606/17216), [Vyxal](https://codegolf.stackexchange.com/a/259569/17216). (Not tested: [8th](https://codegolf.stackexchange.com/a/135027/17216), [Axiom](https://codegolf.stackexchange.com/a/116761/17216), [Hoon](https://codegolf.stackexchange.com/a/82696/17216))
[Answer]
# JavaScript (ES6), ~~92~~ ~~88~~ ~~80~~ ~~74~~ 69 bytes:
Thanks @ConorOBrien and @Neil
```
y=>(g=(a,b)=>b?g(b,a%b):a,[...Array(y)].map((_,i)=>y=y*++i/g(y,i)),y)
```
[Answer]
# [Desmos](https://desmos.com/calculator), 16 bytes
```
f(n)=[1...n].lcm
```
Super straightforward
[Try It On Desmos!](https://www.desmos.com/calculator/wodluq0i4y)
[Answer]
# [Nim](https://nim-lang.org/), 52 bytes
```
import math,sequtils
func p[I](n:I):I=lcm toSeq 1..n
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m704LzN3wYKlpSVpuhY3TTJzC_KLShRyE0sydIpTC0tLMnOKudJK85IVCqI9YzXyrDw1rTxtc5JzFUryg1MLFQz19PIgelemJmfkKxRomGtC-DAzAQ)
[Answer]
## 05AB1E, 20 bytes
```
Lpvyi¬πL√íN>¬¢√†N>*ÀÜ}}¬ØP
```
**Explanation**
```
Lpv                    # for each item in isprime(range(1,N)): N=7 -> [0,1,1,0,1,0,1]
   yi                  # if prime
     ¬πL√íN>¬¢            # count occurrences of the prime 
                         in the prime-factorization of range(1,N):
                         p=2 -> [0,1,0,2,0,1,0]
           √†N>*ÀÜ       # add max occurrence of that prime multiplied by the prime 
                         to global array: N=7 -> [4,3,5,7]
                }}     # end if/loop
                  ¬ØP   # get product of global array
```
[Try it online](http://05ab1e.tryitonline.net/#code=THB2eWnCuUzDkk4-wqLDoE4-KsuGfX3Cr1A&input=Nw)
[Answer]
## [Minkolang 0.15](https://github.com/elendiastarman/Minkolang), 12 bytes
I have *two* 12-byte solutions, and have included them both.
```
1n[i1+4$M]N.
```
[Try it here!](http://play.starmaninnovations.com/minkolang/?code=1n%5Bi1%2B4%24M%5DN%2E&input=7)
## Explanation
```
1               Push 1
 n              Take number from input
  [             For loop that repeats n times
   i1+          Push loop counter + 1
      4$M       Pop b, a and push lcm(a,b)
         ]      Close for loop
          N.    Output as number and stop.
```
About as straightforward as it gets.
---
```
11nLd[4$M]N.
```
[Try it here!](http://play.starmaninnovations.com/minkolang/?code=11nLd%5B4%24M%5DN%2E&input=7)
## Explanation
```
11              Push two 1s
  n             Take number from input
   L            Pop b, a and push range from a to b, inclusive
    d           Duplicate top of stack (n)
     [4$M]      Pop b, a and push lcm(a,b), n times
          N.    Output as number and stop.
```
A third solution can be derived from this: remove a `1` and add a `d` after the current `d`. In both cases, the extra number is needed because the for loop runs one too many times, and making it run one less time takes two bytes (`1-` just before the `[`).
[Answer]
# Ruby, 25 bytes
```
g=->n{(1..n).reduce :lcm}
```
# Ruby, 25 bytes
```
g=->n{n<1?1:a[n-1].lcm n}
```
[Answer]
# GameMaker Language, 60 bytes
```
for(b=k=1;b;++k){b=0for(t=argument0;t;b+=k mod t--)}return k
```
Based on the logic of anatolyg's answer.
[Answer]
# PHP, ~~61~~ ~~52~~ 48 bytes
saved 9 bytes thanks to @user59178, 4 bytes by merging the loops.
Recursion in PHP is bulky due to the `function` key word; so I use iteration.  
And with a "small"few tricks, I now even beat [Arnauld¬¥s JS](https://codegolf.stackexchange.com/questions/a/105588#105588).
```
while(++$k%++$i?$i>$argv[1]?0:$i=1:$k--);echo$k;
```
takes input from command line argument. Run with `-r`.
**breakdown**
```
while(++$k%++$i?    # loop $i up; if it does not divide $k
    $i>$argv[1]?0       # break if $i (smallest non-divisor of $k) is larger than input
    :$i=1               # while not, reset $i and continue loop with incremented $k
    :$k--);         # undo increment while $i divides $k
echo$k;         # print $k
```
**ungolfed**
That¬¥s actually two loops in one:
```
while($i<=$argv[1]) # loop while $i (smallest non-divisor of $k) is not larger than input
    for($k++,       # loop $k up from 1
        $i=0;$k%++$i<1;);   # loop $i up from 1 while it divides $k
echo$k;             # print $k
```
*Note: copied from [my answer on the duplicate](https://codegolf.stackexchange.com/a/105593#105593)*
[Answer]
## [QBIC](https://drive.google.com/drive/folders/0B0R1Jgqp8Gg4cVJCZkRkdEthZDQ), ~~35~~ 32 bytes
[This](https://codegolf.stackexchange.com/questions/105577/find-the-smallest-positive-integer-which-has-all-integers-from-1-to-n-as-factors) brought me here.
```
:{p=0[a|~q%b|p=1]]~p=0|_Xq\q=q+1
```
Explanation:
```
:        Get cmd line param as number 'a'
{        Start an infinite DO loop
p=0      Sets a flag that shows if divisions failed
[a|      FOR (b=1; b<=a; b++)
~q%b     IF 'q' (which starts at 1 in QBIC) is not cleanly divisible by 'b'
|p=1     THEN Set the flag
]]   Close the FOR loop and the IF, leave the DO open
~p=0     IF 'q' didn't get flagged
|_Xq     THEN quit, printing 'q'
\q=q+1   ELSE raise 'q', redo
         [DO Loop implicitly closed by QBIC]
```
Here's a version that stops testing `q` when `b` doesn't cleanly divide it. Also, the order of testing `b`'s against `q` is reversed in the assumption that higher `b`'s will be harder to divide by (take `2`, `3`, `4` for instance: if `%2=0`, `%4` could be `!0`. Vice versa not so much...).
```
:{p=0[a,2,-1|~q%b|p=1‚îòb=2]]~p=0|_Xq\q=q+1
```
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 14 bytes
```
n->lcm([1..n])
```
[Try it online!](https://tio.run/nexus/pari-gp#S1OwVfifp2uXk5yrEW2op5cXq/k/Lb9IIw8obqijYGigo1BQlJlXAhRQUtC1AxJpGnmampr/AQ "Pari/GP ‚Äì TIO Nexus")
[Answer]
# Japt, 10 bytes
No LCM built-in.
```
@√µ e!vX}a1
```
[Try it](https://ethproductions.github.io/japt/?v=1.4.5&code=QPUgZSF2WH1hMQ==&input=OA==)
[Answer]
## Pyke, 3 bytes
```
S.L
```
[Try it here!](http://pyke.catbus.co.uk/?code=S.L&input=7)
```
S   - range(1, input+1)
 .L - lowest_common_multiple(^)
```
]