A051237 Lexicographically earliest prime pyramid, read by rows.
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
Offset: 1
Examples
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;
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
Crossrefs
Programs
-
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 *)
Extensions
More terms from Jud McCranie
Comments