login

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

Numbers k such that at least one of the numbers 6k-1 or 6k+1 is prime
0

%I #27 Nov 05 2024 15:20:37

%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,23,25,26,27,28,

%T 29,30,32,33,35,37,38,39,40,42,43,44,45,46,47,49,51,52,53,55,56,58,59,

%U 60,61,62,63,64,65,66,67,68,70,72,73,74,75,76,77,78,80,81,82,83,84,85,87

%N Numbers k such that at least one of the numbers 6k-1 or 6k+1 is prime

%t Select[Range[100], PrimeQ[6 # - 1] || PrimeQ[6 # + 1] &]

%o (PARI) isok(k) = isprime(6*k-1) || isprime(6*k+1); \\ _Michel Marcus_, Oct 31 2024

%Y Union of A024898 and A024899.

%Y Cf. A002476, A007528.

%Y Complement of A060461 (with respect to the positive integers) or A171696 (with respect to the nonnegative integers).

%K nonn,easy

%O 1,2

%A _Michel Eduardo Beleza Yamagishi_, Oct 31 2024