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 A064219 #21 Jun 21 2023 08:03:06 %S A064219 1,1,2,3,15,24,35,119,504,720,2519,2519,41040,83160,83160,196559, %T A064219 524160,524160,3160079,3160079,3160079,3160079,68468400,68468400, %U A064219 68468400,68468400,4724319600,4724319600,26702675999,26702675999 %N A064219 a(1) = 1; a(n) > 0; for each k from 1 to n, k divides a(n) or a(n)+1 and a(n) is the least such integer. %H A064219 Chai Wah Wu, <a href="/A064219/b064219.txt">Table of n, a(n) for n = 1..112</a> %H A064219 Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a064/A064219.java">Java program</a> (github) %e A064219 a(5)=15 because (2 divides a(5)+1) and (3 divides a(5)) and (4 divides a(5)+1) and (5 divides a(5)). %o A064219 (PARI) { a=1; for (n=1, 100, if (a%n && (a+1)%n, until (b, b=1; a++; for (k=1, n, if (a%k && (a+1)%k, b=0; break)))); write("b064219.txt", n, " ", a) ) } \\ _Harry J. Smith_, Sep 10 2009 %o A064219 (Python) %o A064219 from math import lcm %o A064219 from itertools import product %o A064219 from sympy.ntheory.modular import solve_congruence %o A064219 def A064219(n): %o A064219 if n == 1: return 1 %o A064219 alist, blist, c, klist = [], [], 1, list(range(n,1,-1)) %o A064219 while klist: %o A064219 k = klist.pop(0) %o A064219 if not c%k: %o A064219 blist.append(k) %o A064219 else: %o A064219 c = lcm(c,k) %o A064219 alist.append(k) %o A064219 for m in klist.copy(): %o A064219 if not k%m: %o A064219 klist.remove(m) %o A064219 for d in product([0,1],repeat=len(alist)): %o A064219 x = solve_congruence(*list(zip(d,alist))) %o A064219 if x is not None: %o A064219 y = x[0] %o A064219 if y > 1: %o A064219 for b in blist: %o A064219 if y%b > 1: %o A064219 break %o A064219 else: %o A064219 if y < c: %o A064219 c = y %o A064219 return int(c-1) # _Chai Wah Wu_, Jun 19 2023 %K A064219 easy,nonn %O A064219 1,3 %A A064219 _Don Reble_, Sep 21 2001