login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082120 Smallest difference > 1 between d and n/d for any divisor d of n. 10
2, 3, 4, 5, 6, 2, 8, 3, 10, 4, 12, 5, 2, 6, 16, 3, 18, 8, 4, 9, 22, 2, 24, 11, 6, 3, 28, 7, 30, 4, 8, 15, 2, 5, 36, 17, 10, 3, 40, 11, 42, 7, 4, 21, 46, 2, 48, 5, 14, 9, 52, 3, 6, 10, 16, 27, 58, 4, 60, 29, 2, 12, 8, 5, 66, 13, 20, 3, 70, 6, 72, 35, 10, 15, 4, 7, 78, 2, 24, 39, 82, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET

3,1

COMMENTS

a(p) = p-1 for prime p.

LINKS

Robert Israel, Table of n, a(n) for n = 3..10000

MAPLE

F:= proc(n) local p;

  p:= min(select(t -> t - n/t > 1, numtheory:-divisors(n)));

  p - n/p

end proc:

map(F, [$3..100]); # Robert Israel, Aug 12 2015

MATHEMATICA

sd[n_]:=Min[Select[Abs[#-n/#]&/@Divisors[n], #>1&]]; Array[sd, 90, 3] (* Harvey P. Dale, Sep 28 2013 *)

PROG

(PARI) for(n=3, 100, v=divisors(n); r=sqrt(n); t=0; for(k=1, length(v), if(v[k]>=r, t=k; break)); if(v[t]^2==n, u=t, u=t-1); if(v[t]-v[u]<2, u=u-1; t=t+1); print1(v[t]-v[u]", "))

CROSSREFS

Cf. A082119, A056737, A003681, A082121.

Sequence in context: A245342 A203580 A043266 * A104148 A286450 A245344

Adjacent sequences:  A082117 A082118 A082119 * A082121 A082122 A082123

KEYWORD

nonn,easy

AUTHOR

Ralf Stephan, Apr 04 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 8 08:49 EST 2019. Contains 329862 sequences. (Running on oeis4.)