OFFSET
2,2
COMMENTS
Or, smallest b such that 1/n + 1/c = 1/b has integer solutions.
Largest b is (n-1) since 1/n + 1/(n(n-1)) = 1/(n-1).
a(n) = smallest k such that k*n/(k-n) is an integer. - Derek Orr, May 29 2014
LINKS
Harry J. Smith, Table of n, a(n) for n = 2..1000
FORMULA
If n is prime a(n) = n - 1. - Benoit Cloitre, Dec 31 2001
EXAMPLE
a(6) = 2 because 6*3/(6+3) = 2 is the smallest integer of the form 6*k/(6+k).
a(10) = 5 since 1/10 + 1/10 = 1/5, 1/10 + 1/15 = 1/6, 1/10 + 1/40 = 1/8, 1/10 + 1/90 = 1/9 and so the first sum provides the value.
MATHEMATICA
spi[n_]:=Module[{k=1}, While[!IntegerQ[(n*k)/(n+k)], k++]; (n*k)/(n+k)]; Array[ spi, 80, 2] (* Harvey P. Dale, May 05 2022 *)
PROG
(PARI) a(n)={my(k=1); if(n>1, while (n*k%(n + k), k++); n*k/(n + k))} \\ Harry J. Smith, Aug 20 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jul 19 2001
EXTENSIONS
New description from Benoit Cloitre, Dec 31 2001
Entry revised by N. J. A. Sloane, Feb 13 2007
Definition revised by Franklin T. Adams-Watters, Aug 07 2009
STATUS
approved