login
A336378
Numbers k such that gcd(k, prime(k-1) + prime(k+1)) = 1.
4
2, 3, 7, 13, 17, 19, 23, 27, 29, 31, 37, 41, 43, 45, 47, 49, 53, 55, 59, 61, 63, 65, 67, 69, 71, 73, 77, 79, 81, 83, 85, 89, 91, 93, 95, 97, 101, 103, 107, 109, 111, 113, 117, 119, 121, 125, 127, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 157
OFFSET
1,1
EXAMPLE
In the following table, p(k) = A000040(k) = prime(k).
k p(k) p(k-1)+p(k+1) gcd
2 3 7 1
3 5 10 1
4 7 16 4
5 11 20 5
6 13 28 2
2 and 3 are in this sequence; 4 and 5 are in A336379; 3 and 5 are in A336380; 7 and 11 are in A336381.
MATHEMATICA
p[n_] := Prime[n];
u = Select[Range[2, 200], GCD[#, p[# - 1] + p[# + 1]] == 1 &] (* A336378 *)
v = Select[Range[2, 200], GCD[#, p[# - 1] + p[# + 1]] > 1 &] (* A336379 *)
Prime[u] (* A336380 *)
Prime[v] (* A336381 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Oct 06 2020
EXTENSIONS
Offset corrected by Mohammed Yaseen, Jul 16 2023
STATUS
approved