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 A365249 #32 Oct 07 2023 08:48:31 %S A365249 25,85,121,133,145,187,205,217,221,253,301,325,361,385,403,437,445, %T A365249 451,481,505,529,533,553,565,625,667,697,721,745,793,817,841,865,893, %U A365249 913,925,973,985,1003,1027,1037,1045,1057,1073,1081,1141,1157,1165,1207,1225 %N A365249 Composite numbers k for which A214749(k) = (k-1)/2. %C A365249 As can be seen from A214749, for most odd composites k the smallest value of m that satisfies k-m | k^2+m is smaller than (k-1)/2. This sequence lists the exceptions. All the odd primes appear to satisfy A214749(p) = (p-1)/2. %H A365249 Chai Wah Wu, <a href="/A365249/b365249.txt">Table of n, a(n) for n = 1..10000</a> %o A365249 (Python) %o A365249 from sympy import isprime %o A365249 a=[] %o A365249 for n in range(3,1000): %o A365249 for m in range(1,(n-1)//2+1): %o A365249 if (n**2+m)%(n-m)==0: %o A365249 if m==(n-1)/2 and not isprime(n): %o A365249 a.append(n) %o A365249 break %o A365249 print(a) %o A365249 (Python) %o A365249 from itertools import count, islice %o A365249 from sympy import isprime %o A365249 from sympy.abc import x, y %o A365249 from sympy.solvers.diophantine.diophantine import diop_quadratic %o A365249 def A365249_gen(startvalue=3): # generator of terms >= startvalue %o A365249 return filter(lambda n:not isprime(n) and min(int(x) for x,y in diop_quadratic(n*(n-y)+x*(y+1)) if x>0)==n-1>>1, count(max(startvalue+startvalue&1^1,3),2)) %o A365249 A365249_list = list(islice(A365249_gen(),30)) # _Chai Wah Wu_, Oct 06 2023 %o A365249 (PARI) f(n) = my(m=1); while((n^2+m) % (n-m), m++); m; \\ A214749 %o A365249 lista(nn) = my(list=List()); forcomposite(c=1, nn, if (f(c) == (c-1)/2, listput(list, c))); Vec(list); \\ _Michel Marcus_, Sep 04 2023 %Y A365249 Cf. A214749, A365248. %K A365249 nonn %O A365249 1,1 %A A365249 _Bob Andriesse_, Aug 28 2023