OFFSET
1,1
COMMENTS
For each k = 3,4,5,6 there are k consecutive primes p_n, p_{n+1}, ..., p_{n+k-1} such that there is no permutation q_1, ..., q_k of p_n, p_{n+1}, ..., p_{n+k-1} with |q_1-q_2|, ..., |q_{k-1}-q_k|, |q_k-q_1| pairwise distinct. Such consecutive primes include (3, 5, 7), (5, 7, 11, 13), (3, 5, 7, 11, 13), and (p_{2209}, p_{2210}, ..., p_{2214}) = (19471, 19477, 19483, 19489, 19501, 19507).
For k > 7 the author once thought that for any k consecutive primes p_n, p_{n+1}, ..., p_{n+k-1} there always exists a permutation q_1, ..., q_k of p_n, p_{n+1}, ..., p_{n+k-1} with |q_1-q_2|, ..., |q_{k-1}-q_k|, |q_k-q_1| pairwise distinct. But this is unlikely to be true as pointed out by Noam D. Elkies.
See also A185645 for a related conjecture.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Noam D. Elkies, Re: A conjecture on permutations of consecutive primes, a message to Number Theory List, August 31, 2013.
EXAMPLE
a(2) = 2 since there are exactly two permutations q_1,...,q_7 of 3,5,7,11,13,17,19 meeting the requirement: (q_1,...,q_7) = (3, 7, 17, 11, 13, 5, 19), (3, 11, 13, 7, 17, 5, 19).
MATHEMATICA
V[n_, i_]:=Part[Permutations[{Prime[n+1], Prime[n+2], Prime[n+3], Prime[n+4], Prime[n+5]}], i]
Do[m=0; Do[If[Length[Union[{Abs[Part[V[n, i], 1]-Prime[n]]}, Table[Abs[Part[V[n, i], j]-If[j<5, Part[V[n, i], j+1], Prime[n+6]]], {j, 1, 5}]]]<6, Goto[aa]];
m=m+1; Label[aa]; Continue, {i, 1, 5!}]; Print[n, " ", m]; Continue, {n, 1, 20}]
A187815[n_] := Module[{p, c = 0, i = 1, j, q},
p = Permutations[Table[Prime[j], {j, n + 1, n + 5}]];
While[i <= Length[p],
q = Join[{Prime[n]}, p[[i]], {Prime[n + 6]}]; i++;
If[Length[
Union[Join[
Table[Abs[q[[j]] - q[[j + 1]]], {j, 1, 6}], {Abs[
q[[7]] - q[[1]]]}]]] == 7, c++]]; c];
Table[A187815[n], {n, 1, 60}] (* Robert Price, Apr 04 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Aug 30 2013
STATUS
approved