cp's OEIS Frontend

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.

A335717 a(n) is the smallest dividend m of the Euclidean division m = d*n + r such that m/d = r/n.

Original entry on oeis.org

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

Views

Author

Stéphane Rézel, Jun 18 2020

Keywords

Comments

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).
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).

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.
		

Crossrefs

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));