OFFSET
2,3
COMMENTS
a(n) is also the least k>0 such that F(n-k) divides F(n+k), where F = A000045 (Fibonacci numbers). More generally, if (f(n)) is a divisibility sequence (that is, f(k)|f(n) if and only k|n), then a(n) is the least k>0 such that f(n-k) divides f(n+k). More examples of such f(n): 2^n-1, 3^n-1, n^2, n^3. - Clark Kimberling, Jul 30 2012
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..10000
Vaclav Kotesovec, Plot of Sum_{k=1..n} a(k)/n^2 for n = 1..10000
FORMULA
Sum_{i=1..n} a(i) is asymptotic to c*n^2, where c = 0.28....
MATHEMATICA
Table[i=1; While[!Divisible[n+i, n-i], i++]; i, {n, 2, 100}] (* Harvey P. Dale, Mar 28 2011 *)
PROG
(PARI) a(n)=if(n<0, 0, s=1; while((n+s)%(n-s)>0, s++); s)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Oct 15 2002
STATUS
approved