OFFSET
0,3
COMMENTS
LINKS
Jan Koornstra, Table of n, a(n) for n = 0..10000
EXAMPLE
a(5) = 4, since floor(24/5) = 4, which is positive and not already in the sequence.
a(6) = 24, since floor(4/6) = 0, hence not positive.
MATHEMATICA
Nest[Append[#1, If[And[#3 > 0, FreeQ[#1, #3]], #3, #2 #1[[-1]] ]] & @@ {#1, #2, Floor[#1[[-1]]/#2]} & @@ {#, Length@ #} &, {1}, 53] (* Michael De Vlieger, Jan 23 2019 *)
PROG
(Python 3)
def a323615(n):
seq = []
for i in range(n + 1):
if i == 0: x = 1
else:
x = seq[i - 1] // i
if x in seq or x == 0: x = seq[i - 1] * i
seq.append(x)
return seq
print(a323615(100))
CROSSREFS
KEYWORD
AUTHOR
Jan Koornstra, Jan 20 2019
STATUS
approved