login
Primes p(k) such that gcd(k, prime(k-1)+prime(k+1)) = 1.
3

%I #11 Jul 17 2023 01:16:10

%S 3,5,17,41,59,67,83,103,109,127,157,179,191,197,211,227,241,257,277,

%T 283,307,313,331,347,353,367,389,401,419,431,439,461,467,487,499,509,

%U 547,563,587,599,607,617,643,653,661,691,709,739,751,761,773,797,811

%N Primes p(k) such that gcd(k, prime(k-1)+prime(k+1)) = 1.

%e In the following table, p(n) = A000040(n) = prime(n).

%e n p(n) p(n-1)+p(n+1) gcd

%e 2 3 7 1

%e 3 5 10 1

%e 4 7 16 4

%e 5 11 20 5

%e 6 13 28 2

%e 2 and 3 are in A336378; 4 and 5 are in A336379; 3 and 5 are in this sequence; 7 and 11 are in A336381.

%t p[n_] := Prime[n];

%t u = Select[Range[2, 200], GCD[#, p[# - 1] + p[# + 1]] == 1 &] (* A336378 *)

%t v = Select[Range[2, 200], GCD[#, p[# - 1] + p[# + 1]] > 1 &] (* A336379 *)

%t Prime[u] (* this sequence *)

%t Prime[v] (* A336381 *)

%Y Cf. A000040, A336366, A336378, A336379, A336381.

%K nonn

%O 1,1

%A _Clark Kimberling_, Oct 25 2020

%E Offset corrected by _Mohammed Yaseen_, Jul 17 2023