%I #46 Nov 05 2017 11:50:22
%S 6,3,5,7,22,11,13,27,17,19,46,23,112,58,29,31,250,57,37,55,41,43,94,
%T 47,60,106,53,87,84,59,61,85,108,67,142,71,73,712,158,79,156,83,405,
%U 115,89,141,406,119,97,202,101,103,214,107,109,145,113,177,418,143,120,243,192,127,262,131,261,274,137,139,574,185
%N a(n) is the smallest number whose deficiency or abundance is equal to 2*n, or a(n) = 0 if such a number does not exist.
%C If A096502(n) <> 0, i.e., there is a prime p of the form 2^k - 2*n - 1, then 0 < a(n) <= 2^(k-1)*p since 2^(k-1)*p has deficiency 2*n. - _Robert Israel_, Oct 29 2017
%H Michel Marcus, <a href="/A294386/b294386.txt">Table of n, a(n) for n = 0..8220</a> (terms <= 10^10) (terms 0..1644 from Robert Israel)
%p N:= 100: # to get a(0)..a(N)
%p count:= 0:
%p for n from 1 while count < N+1 do
%p d:= abs(2*n - numtheory:-sigma(n));
%p if d::even and d <= 2*N and not assigned(A[d/2]) then
%p count:= count+1; A[d/2]:= n;
%p fi
%p od:
%p seq(A[i],i=0..N); # _Robert Israel_, Oct 29 2017
%o (PARI) a033879(n) = 2*n-sigma(n)
%o a(n) = my(k=1); while(1, if(abs(a033879(k))==2*n, return(k)); k++) \\ _Felix Fröhlich_, Oct 29 2017
%Y Bisection of A294347.
%Y First differs from A217769 at a(12).
%Y Cf. A000203, A000396, A005100, A005101, A033879, A033880, A096502, A294393, A294406.
%K nonn
%O 0,1
%A _Michel Marcus_ and _Omar E. Pol_, Oct 29 2017
|