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 A345994 #21 Jun 17 2022 11:19:57 %S A345994 1,1,1,1,1,2,1,1,1,2,1,3,1,2,3,1,1,2,1,4,3,2,1,3,1,2,1,4,1,5,1,1,3,2, %T A345994 5,4,1,2,3,5,1,6,1,4,5,2,1,3,1,2,3,4,1,2,5,7,3,2,1,4,1,2,7,1,5,6,1,4, %U A345994 3,5,1,8,1,2,3,4,7,6,1,5,1,2,1,4,5,2,3,8,1,9,7,4,3,2,5 %N A345994 Let m = A344005(n) = smallest m such that n divides m*(m+1); a(n) = min(gcd(n,m), gcd(n,m+1)). %C A345994 This is the minimum of A345992 and A345993. %H A345994 N. J. A. Sloane, <a href="/A345994/b345994.txt">Table of n, a(n) for n = 1..10000</a> %o A345994 (Python 3.8+) %o A345994 from math import gcd, prod %o A345994 from itertools import combinations %o A345994 from sympy import factorint %o A345994 from sympy.ntheory.modular import crt %o A345994 def A345994(n): %o A345994 if n == 1: %o A345994 return 1 %o A345994 plist = tuple(p**q for p, q in factorint(n).items()) %o A345994 return 1 if len(plist) == 1 else min(gcd(n,s:=int(min(min(crt((m, n//m), (0, -1))[0], crt((n//m, m), (0, -1))[0]) for m in (prod(d) for l in range(1, len(plist)//2+1) for d in combinations(plist, l))))),gcd(n,s+1)) # _Chai Wah Wu_, Jun 17 2022 %Y A345994 Cf. A344005, A345992, A345993, A345995, A346956. %Y A345994 Cf. also A051119, A284600. %K A345994 nonn %O A345994 1,6 %A A345994 _Robert Dougherty-Bliss_ and _N. J. A. Sloane_, Jul 15 2021