|
|
A051237
|
|
Lexicographically earliest prime pyramid, read by rows.
|
|
11
|
|
|
1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 4, 3, 2, 5, 1, 4, 3, 2, 5, 6, 1, 4, 3, 2, 5, 6, 7, 1, 2, 3, 4, 7, 6, 5, 8, 1, 2, 3, 4, 7, 6, 5, 8, 9, 1, 2, 3, 4, 7, 6, 5, 8, 9, 10, 1, 2, 3, 4, 7, 10, 9, 8, 5, 6, 11, 1, 2, 3, 4, 7, 10, 9, 8, 5, 6, 11, 12, 1, 2, 3, 4, 7, 6, 5, 12, 11, 8, 9, 10, 13, 1, 2, 3, 4, 7, 6, 13, 10
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Row n begins with 1, ends with n and sum of any two adjacent entries is prime.
Since the sum of any two adjacent entries is at least 3, the sum is an odd prime, which implies that any two consecutive entries have opposite parity.
Since the first and last entries of row n are fixed at 1 and n, we have to find n-2 entries, where ceiling((n-2)/2) of them are even and floor((n-2)/2) are odd, so for row n the number of possible arrangements is
(ceiling((n-2)/2))! * (floor((n-2)/2))! (Cf. A010551(n-2), n >= 2.)
The number of ways of arranging row n to get a prime pyramid is given by A036440. List them in lexicographic order and pick the first (earliest) to get row n of lexicographically earliest prime pyramid.
Prime pyramids are also (more fittingly?) called prime triangles. (End)
It appears that the limit of the rows of the lexicographically earliest prime pyramid is A055265 (see comment in that sequence).
Assuming Dickson's conjecture (or the later Hardy-Littlewood Conjecture B), no backtracking is needed: if the first n-2 elements in each row are chosen greedily, a penultimate member can be chosen such that its sums are prime. - Charles R Greathouse IV, May 18 2011
|
|
REFERENCES
|
R. K. Guy, Unsolved Problems Number Theory, Section C1.
|
|
LINKS
|
|
|
EXAMPLE
|
Triangle begins:
1;
1, 2;
1, 2, 3;
1, 2, 3, 4;
1, 4, 3, 2, 5;
1, 4, 3, 2, 5, 6;
1, 4, 3, 2, 5, 6, 7;
1, 2, 3, 4, 7, 6, 5, 8;
1, 2, 3, 4, 7, 6, 5, 8, 9;
1, 2, 3, 4, 7, 6, 5, 8, 9, 10;
1, 2, 3, 4, 7, 10, 9, 8, 5, 6, 11;
1, 2, 3, 4, 7, 10, 9, 8, 5, 6, 11, 12;
1, 2, 3, 4, 7, 6, 5, 12, 11, 8, 9, 10, 13;
|
|
MATHEMATICA
|
(* first do *) Needs["Combinatorica`"] (* then *) f[n_] := Block[{r = Range@ n}, While[ Union[ PrimeQ[ Plus @@@ Partition[r, 2, 1]]][[1]] == False, r = NextPermutation@ r]; r]; f[1] = 1; Array[f, 13] // Flatten (* Robert G. Wilson v *)
|
|
CROSSREFS
|
See A187869 for the concatenation of the numbers for each row.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|