A335717 a(n) is the smallest dividend m of the Euclidean division m = d*n + r such that m/d = r/n.
25, 100, 162, 676, 400, 2500, 1156, 2352, 1458, 14884, 2601, 28900, 5202, 6084, 8712, 84100, 9408, 131044, 10816, 22500, 22275, 280900, 19602, 79380, 36517, 60516, 40000, 708964, 31827, 925444, 67600, 46128, 80937, 62500, 55112, 1876900, 112651, 88752, 83232
Offset: 2
Examples
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. 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.
Links
- Robert Israel, Table of n, a(n) for n = 2..10000
Programs
-
Maple
f:= proc(n) local m, r,k,d; for k from n-1 to 1 by -1 do r:= n^2+k; m:= r^2/k; if not m::integer then next fi; d:= n*r/k; if d::integer then return m fi; od end proc: map(f, [$2..50]); # Robert Israel, Sep 16 2020
-
Mathematica
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]]]]; Table[f[n], {n, 2, 50}] (* Jean-François Alcover, Jul 31 2024, after Robert Israel *)
-
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));
Comments