A288209 Numbers k such that prime(k) * prime(k+1) mod prime(k+2) is odd.
1, 2, 5, 7, 10, 14, 15, 23, 29, 46, 61
Offset: 1
Examples
The first five primes are 2, 3, 5, 7, 11. We see that 2 * 3 = 1 mod 5, so 1 (corresponding to the first prime, 2) is in the sequence. We see that 3 * 5 = 1 mod 7, so 2 (corresponding to the second prime, 3) is in the sequence. But 5 * 7 = 2 mod 11, so 3 (corresponding to the third prime, 5) is not in the sequence.
Links
- Wikipedia, Cramér's conjecture
Programs
-
Maple
P:= select(isprime, [2,seq(i,i=3..10^6,2)]): select(n -> (P[n]*P[n+1] mod P[n+2])::odd, [$1..nops(P)-2]); # Robert Israel, Jun 19 2017
-
Mathematica
Select[Range[1000], OddQ[Mod[Prime[#] Prime[# + 1], Prime[# + 2]]] &] (* Alonso del Arte, Jun 06 2017 *) Position[Partition[Prime[Range[70]],3,1],?(OddQ[Mod[#[[1]]#[[2]], #[[3]]]]&),1,Heads->False]//Flatten (* _Harvey P. Dale, Aug 11 2017 *)
-
PARI
isok(n) = (((prime(n) * prime(n + 1)) % prime(n + 2)) % 2); \\ Michel Marcus, Jun 07 2017
Comments