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 A335717 #30 Jul 31 2024 11:27:22 %S A335717 25,100,162,676,400,2500,1156,2352,1458,14884,2601,28900,5202,6084, %T A335717 8712,84100,9408,131044,10816,22500,22275,280900,19602,79380,36517, %U A335717 60516,40000,708964,31827,925444,67600,46128,80937,62500,55112,1876900,112651,88752,83232 %N A335717 a(n) is the smallest dividend m of the Euclidean division m = d*n + r such that m/d = r/n. %C A335717 Such a Euclidean division exists, for all n>1, with r = n^2 + 1 because then m = r^2 and d = n*r. This solution leads to the largest possible dividend, given (for n>1) by A082044(n). This is also the only solution when n is prime, then a(n) = A082044(n). %C A335717 Solutions with r = n^2 + k are only possible for most of the integers k < n such that any prime factor of k is also a prime factor of n. The largest such integers k are given by A079277(n). In the present sequence, k is not always this largest integer: a(18) is defined by k = 12 while it cannot be defined by k = 16 = A079277(18). %H A335717 Robert Israel, <a href="/A335717/b335717.txt">Table of n, a(n) for n = 2..10000</a> %e A335717 a(2) = 25 because 25 = 10*2 + 5 and 25/10 = 5/2. Furthermore, there is no Euclidean division with a dividend less than 25 such that m/d = r/2. %e A335717 a(4) = 162 because 162 = 36*4 + 18 and 162/36 = 18/4. The other Euclidean division with the same property has a larger dividend : 289 = 68*4 + 17 and 289/68 = 17/4. %p A335717 f:= proc(n) local m, r,k,d; %p A335717 for k from n-1 to 1 by -1 do %p A335717 r:= n^2+k; %p A335717 m:= r^2/k; %p A335717 if not m::integer then next fi; %p A335717 d:= n*r/k; %p A335717 if d::integer then return m fi; %p A335717 od %p A335717 end proc: %p A335717 map(f, [$2..50]); # _Robert Israel_, Sep 16 2020 %t A335717 f[n_] := Module[{m, r, k, d}, For[k = n-1, k >= 1, k--, r = n^2+k; m = r^2/k; If[!IntegerQ[m], Continue]; d = n*r/k; If[IntegerQ[d], Return[m]]]]; %t A335717 Table[f[n], {n, 2, 50}] (* _Jean-François Alcover_, Jul 31 2024, after _Robert Israel_ *) %o A335717 (PARI) a(n) = k=n; until(k==1, k--; r=k + n^2; d=n*r/k; m=r^2/k; if(floor(d)==d && floor(m)==m, return(m); break)); %Y A335717 Cf. A079277, A082044. %K A335717 nonn,look %O A335717 2,1 %A A335717 _Stéphane Rézel_, Jun 18 2020