cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A051599 Rows of triangle formed using Pascal's rule except begin and end n-th row with (n+1)st prime.

This page as a plain text file.
%I A051599 #19 Jul 02 2025 16:01:58
%S A051599 2,3,3,5,6,5,7,11,11,7,11,18,22,18,11,13,29,40,40,29,13,17,42,69,80,
%T A051599 69,42,17,19,59,111,149,149,111,59,19,23,78,170,260,298,260,170,78,23,
%U A051599 29,101,248,430,558,558,430,248,101,29,31,130,349,678,988,1116,988,678,349,130,31
%N A051599 Rows of triangle formed using Pascal's rule except begin and end n-th row with (n+1)st prime.
%H A051599 Vincenzo Librandi, <a href="/A051599/b051599.txt">Rows n = 0..100, flattened</a>
%H A051599 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%e A051599 Triangle begins:
%e A051599 2;
%e A051599 3,  3;
%e A051599 5,  6,   5;
%e A051599 7,  11,  11,  7;
%e A051599 11, 18,  22,  18,  11;
%e A051599 13, 29,  40,  40,  29,  13;
%e A051599 17, 42,  69,  80,  69,  42,   17;
%e A051599 19, 59,  111, 149, 149, 111,  59,  19;
%e A051599 23, 78,  170, 260, 298, 260,  170, 78,  23;
%e A051599 29, 101, 248, 430, 558, 558,  430, 248, 101, 29;
%e A051599 31, 130, 349, 678, 988, 1116, 988, 678, 349, 130, 31;
%t A051599 t = {}; Do[r = {}; Do[If[k == 0 || k == n, m = Prime[n + 1], m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t (* _T. D. Noe_, Jul 31 2013 *)
%o A051599 (Haskell)
%o A051599 a051599 n k = a051599_tabl !! n !! k
%o A051599 a051599_row n = a051599_tabl !! n
%o A051599 a051599_tabl = map fst $ iterate f ([2], a001223_list) where
%o A051599    f (row, (d:ds)) =  (zipWith (+) ([d] ++ row) (row ++ [d]), ds)
%o A051599 -- _Reinhard Zumkeller_, Nov 23 2012
%Y A051599 Cf. A001223; A000040 (left and right edges), A053210 (row sums).
%K A051599 easy,nonn,tabl
%O A051599 0,1
%A A051599 _Asher Auel_
%E A051599 Corrected by _James Sellers_, Dec 15 1999