login
Least k such that (n-k) divides (n+k).
6

%I #22 Sep 12 2020 03:24:28

%S 1,1,2,3,2,5,4,3,5,9,4,11,7,5,8,15,6,17,10,7,11,21,8,15,13,9,14,27,10,

%T 29,16,11,17,21,12,35,19,13,20,39,14,41,22,15,23,45,16,35,25,17,26,51,

%U 18,33,28,19,29,57,20,59,31,21,32,39,22,65,34,23,35,69,24,71,37,25,38

%N Least k such that (n-k) divides (n+k).

%C 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

%H Amiram Eldar, <a href="/A075861/b075861.txt">Table of n, a(n) for n = 2..10000</a>

%H Vaclav Kotesovec, <a href="/A075861/a075861.jpg">Plot of Sum_{k=1..n} a(k)/n^2 for n = 1..10000</a>

%F Sum_{i=1..n} a(i) is asymptotic to c*n^2, where c = 0.28....

%t Table[i=1;While[!Divisible[n+i,n-i],i++];i,{n,2,100}] (* _Harvey P. Dale_, Mar 28 2011 *)

%o (PARI) a(n)=if(n<0,0,s=1; while((n+s)%(n-s)>0,s++); s)

%K nonn

%O 2,3

%A _Benoit Cloitre_, Oct 15 2002