login
a(n) = largest k such that A001358(n+1) = A001358(n) + (A001358(n) mod k), or 0 if no such k exists.
3

%I #5 Mar 30 2012 17:25:56

%S 0,0,8,6,13,9,20,19,24,19,32,33,32,37,32,43,47,47,53,56,54,59,61,64,

%T 71,72,79,84,85,83,89,92,93,84,101,107,112,117,117,120,121,117,125,

%U 132,127,140,141,141,144,137,152,157,157

%N a(n) = largest k such that A001358(n+1) = A001358(n) + (A001358(n) mod k), or 0 if no such k exists.

%C a(n) = A001358(n) - A065516(n) if A001358(n) - A065516(n) > A065516(n), 0 otherwise.

%C A001358(n): semiprimes; A065516(n): first difference of semiprimes.

%H Rémi Eismann, <a href="/A184728/b184728.txt">Table of n, a(n) for n = 1..10000</a>

%e For n = 1 we have A001358(n) = 4, A001358(n+1) = 6; there is no k such that 6 - 4 = 2 = (4 mod k), hence a(1) = 0.

%e For n = 3 we have A001358(n) = 9, A001358(n+1) = 10; 8 is the largest k such that 10 - 9 = 1 = (9 mod k), hence a(3) = 8; a(3) = A001358(3) - A065516(3) = 8.

%e For n = 20 we have A001358(n) = 57, A001358(n+1) = 58; 56 is the largest k such that 58 - 57 = 1 = (57 mod k), hence a(20) = 56; a(20) = A001358(20) - A065516(20) = 56.

%Y Cf. A001358, A065516, A130533, A184729, A117078, A117563, A001223, A118534.

%K nonn,easy

%O 1,3

%A _Rémi Eismann_, Jan 20 2011