This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A323615 #32 Dec 20 2024 20:43:08 %S A323615 1,1,2,6,24,4,24,3,24,216,21,231,19,247,17,255,15,255,14,266,13,273, %T A323615 12,276,11,275,10,270,9,261,8,248,7,231,7854,224,8064,217,5,195,7800, %U A323615 190,7980,185,8140,180,8280,176,8448,172,8600,168,8736,164 %N A323615 a(0) = 1; for n > 0, a(n) = floor(a(n-1)/n) if positive and not already in the sequence, otherwise a(n) = a(n-1)*n. %C A323615 Variation on A008336 using floor division and A076039 not allowing for values already in the sequence. %H A323615 Jan Koornstra, <a href="/A323615/b323615.txt">Table of n, a(n) for n = 0..10000</a> %e A323615 a(5) = 4, since floor(24/5) = 4, which is positive and not already in the sequence. %e A323615 a(6) = 24, since floor(4/6) = 0, hence not positive. %t A323615 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 *) %o A323615 (Python) %o A323615 def a323615(n): %o A323615 seq = [] %o A323615 for i in range(n + 1): %o A323615 if i == 0: x = 1 %o A323615 else: %o A323615 x = seq[i - 1] // i %o A323615 if x in seq or x == 0: x = seq[i - 1] * i %o A323615 seq.append(x) %o A323615 return seq %o A323615 print(a323615(100)) %Y A323615 Cf. A008336, A076039. %K A323615 nonn,easy,look %O A323615 0,3 %A A323615 _Jan Koornstra_, Jan 20 2019