login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the least nonnegative m such that m*n + A001414(n) is not prime.
3

%I #14 Apr 16 2021 00:18:15

%S 0,1,1,0,1,5,1,0,0,2,1,4,1,0,0,0,1,0,1,0,0,1,1,0,0,0,0,1,1,0,1,0,0,2,

%T 0,0,1,0,0,1,1,0,1,0,1,0,1,3,0,0,0,1,1,1,0,1,0,2,1,0,1,0,1,0,0,0,1,0,

%U 0,0,1,0,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,1,1,6,0,0,0,0,0,2,1,0,1

%N a(n) is the least nonnegative m such that m*n + A001414(n) is not prime.

%C a(n) <= A001414(n).

%C a(n) = 0 iff n is not in A100118.

%C a(n) = 1 if n is prime.

%C a(n) >= 3 iff n is in A342302.

%H Robert Israel, <a href="/A343016/b343016.txt">Table of n, a(n) for n = 1..10000</a>

%e a(6) = 5 because A001414(6) = 5 and 5, 6+5=11, 2*6+5=17, 3*6+5=23, and 4*6+5=29 are prime but 5*6+5=35 is not.

%p f:= proc(n) local s, t, k;

%p s:= add(t[1]*t[2], t = ifactors(n)[2]);

%p for k from 0 do if not isprime(k*n+s) then return k fi od;

%p end proc:

%p map(f, [$1..100]);

%t Array[Block[{m = 0, k = Plus @@ Times @@@ FactorInteger[#]}, While[PrimeQ[# m + k], m++]; m] &, 105] (* _Michael De Vlieger_, Apr 13 2021 *)

%Y Cf. A001414, A100118, A342302.

%K nonn

%O 1,6

%A _J. M. Bergot_ and _Robert Israel_, Apr 02 2021