This site is supported by donations to The OEIS Foundation.

 Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS". Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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. From Daniel Forgues, May 17 2011 and May 18 2011: (Start) 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 T. D. Noe, Rows n=1..100 of triangle, flattened Eric Weisstein's World of Mathematics, Prime Triangle OEIS Wiki, Prime triangles 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. Cf. A036440, A051239, A055265. Sequence in context: A183534 A066040 A066019 * A064379 A278961 A194973 Adjacent sequences:  A051234 A051235 A051236 * A051238 A051239 A051240 KEYWORD tabl,nice,nonn,easy AUTHOR EXTENSIONS More terms from Jud McCranie STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.