Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Jan 01 2022 08:11:21
%S 1,2,3,4,5,9,11,12,15,17,19,23,26,29,30,32,33,35,43,45,61,64,71,73,75,
%T 76,83,84,85,86,90,91,95,101,107,108,110,114,121,124,132,136,137,140,
%U 142,143,163,169,175,179,182,184,198,201,211,212,219,222,223,231,234
%N For each k let k_2 be the smallest number greater than k+1 and coprime to k*(k+1) and let k_3 be the smallest number greater than k_2 and coprime to k*(k+1)*k_2. The sequence lists numbers k such that k*(k+1) + k_2*k_3 and -k*(k+1) + k_2*k_3 are prime.
%H Michael De Vlieger, <a href="/A100797/b100797.txt">Table of n, a(n) for n = 1..10000</a>
%e Let k = 5: The smallest number greater than 6 and coprime to 5*6 is 7. The smallest number greater than 7 and coprime to 5*6*7 is 11. Therefore k_2 = 7 and k_3 = 11. Since 5*6 + 7*11 and -5*6 + 7*11 are both primes, 5 is a term of the sequence.
%t e = {}; For[n = 1, n < 250, n++, a = n; b = n + 1; c = n + 2; While[Not[GCD[c, n]*GCD[c, n + 1] == 1], c++ ]; d = c + 1; While[Not[GCD[d, a]*GCD[d, b]*GCD[d, c] == 1], d++ ]; If[PrimeQ[a*b + c*d], If[PrimeQ[ - a*b + c*d], AppendTo[e, n]]]]; e
%K nonn,less
%O 1,2
%A _J. M. Bergot_, May 26 2007
%E Edited, corrected and extended by _Stefan Steinerberger_, Nov 24 2007