login
A100797
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.
1
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, 76, 83, 84, 85, 86, 90, 91, 95, 101, 107, 108, 110, 114, 121, 124, 132, 136, 137, 140, 142, 143, 163, 169, 175, 179, 182, 184, 198, 201, 211, 212, 219, 222, 223, 231, 234
OFFSET
1,2
LINKS
EXAMPLE
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.
MATHEMATICA
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
CROSSREFS
Sequence in context: A360687 A176008 A143827 * A139441 A333612 A362025
KEYWORD
nonn,less
AUTHOR
J. M. Bergot, May 26 2007
EXTENSIONS
Edited, corrected and extended by Stefan Steinerberger, Nov 24 2007
STATUS
approved