OFFSET
1,2
COMMENTS
If a(n) <> n, then n is in A005279.
a(n) is the smallest positive integer k such that n + k divides n^2 + k^2. - Altug Alkan, Mar 29 2018
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
Wikipedia, Harmonic mean -- Two numbers
EXAMPLE
a(6) = 2 because harmonic mean of 6 and 2 is 3 which is an integer and harmonic mean of 6 and 1 is 12/7 which is not an integer.
MATHEMATICA
Array[If[Count[Partition[Divisors[#], 2, 1], _?(#2 < 2 #1 & @@ # &)] == 0, #, Block[{k = 1}, While[! IntegerQ@ HarmonicMean@{k, #}, k++]; k]] &, 76] (* Michael De Vlieger, Apr 05 2018 *)
PROG
(PARI) a(n) = {my(k=1); while((2*n*k) % (n+k) != 0, k++); k; } \\ Altug Alkan, Mar 29 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Mar 20 2000
EXTENSIONS
Name edited by Altug Alkan, Mar 29 2018
STATUS
approved