A138143 Triangle read by rows in which row n lists p(1), p(2), ..., p(n), p(n-1), ..., p(1), where p(i) = i-th prime.
2, 2, 3, 2, 2, 3, 5, 3, 2, 2, 3, 5, 7, 5, 3, 2, 2, 3, 5, 7, 11, 7, 5, 3, 2, 2, 3, 5, 7, 11, 13, 11, 7, 5, 3, 2, 2, 3, 5, 7, 11, 13, 17, 13, 11, 7, 5, 3, 2, 2, 3, 5, 7, 11, 13, 17, 19, 17, 13, 11, 7, 5, 3, 2, 2, 3, 5, 7, 11, 13, 17, 19, 23, 19, 17, 13, 11, 7, 5, 3, 2, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 23, 19, 17, 13, 11, 7, 5, 3, 2
Offset: 1
Examples
Triangle begins: .............. 2 ........... 2, 3, 2 ........ 2, 3, 5, 3, 2 ..... 2, 3, 5, 7, 5, 3, 2 .. 2, 3, 5, 7,11, 7, 5, 3, 2
Programs
-
Mathematica
nn=10;Module[{pr=Prime[Range[nn]],e},Flatten[Table[e=Take[pr,n];Join[ e,Reverse[Most[e]]],{n,nn}]]] (* Harvey P. Dale, Mar 14 2015 *)
Extensions
Edited by N. J. A. Sloane, Apr 07 2008, Nov 15 2008
Comments