OFFSET
1,2
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..2000
EXAMPLE
The 5th term 60, is divisible by 1,2,3,4, and 5.
The 6th term 120, greater than 60, is divisible by 1,2,3,4,5, and 6.
The 10th term 5040, greater than 2520, is divisible by 1,2,3,4,5,6,7,8,9, and 10.
PROG
(Python)
x = [1] # To count the number in the sequence
y = [1] # To record the sequence itself
N = 20 # The number of terms to calculate
while len(x) < N:
x.append(x[-1] + 1)
# The next number in the sequence will be divisible by x[-1] so start
# looking at z which is the largest number divisible by x[-1] so far
z = y[-1]//x[-1] * x[-1] + x[-1]
# Now start counting up by x[-1] and check if the number is divisible by
# every integer less than x[-1]
while any([z%i != 0 for i in x]):
z += x[-1]
y.append(z)
print("{}\t {}\t".format(len(x), z))
(PARI) A003418(n) = if(n<1, n==0, 1/content(vector(n, k, 1/k)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Rian Rustvold, Jul 16 2019
EXTENSIONS
More terms from Jinyuan Wang, Jul 22 2019
STATUS
approved