OFFSET
0,4
REFERENCES
a(3) = 6 because 6 is the smallest k > 3 such that k*3/(k+3) is an integer.
LINKS
Giovanni Resta, Table of n, a(n) for n = 0..1000
FORMULA
For prime p, a(p) = p*(p-1) = A002378(p-1). - Ralf Stephan, Jan 15 2014
MATHEMATICA
a[0]=1; a[n_] := Block[{k, s, x}, s = Reduce[k*n/(k+n) == x && k>n, {k, x}, Integers]; If[s === False, 0, Min[k /. List@ ToRules@s]]]; a/@Range[0, 100] (* Giovanni Resta, Jan 20 2014 *)
PROG
(PARI) a(n)=my(k=n+1); while((n*k)%(n+k)!=0, k=k+1); k \\ Ralf Stephan, Jan 15 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jan 05 2014
STATUS
approved