login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051599 Rows of triangle formed using Pascal's rule except begin and end n-th row with (n+1)st prime. 5

%I #18 Oct 27 2023 22:00:44

%S 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 69,42,17,19,59,111,149,149,111,59,19,23,78,170,260,298,260,170,78,23,

%U 29,101,248,430,558,558,430,248,101,29,31,130,349,678,988,1116,988,678,349,130,31

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

%H Vincenzo Librandi, <a href="/A051599/b051599.txt">Rows n = 0..100, flattened</a>

%H <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>

%e Triangle begins:

%e 2;

%e 3, 3;

%e 5, 6, 5;

%e 7, 11, 11, 7;

%e 11, 18, 22, 18, 11;

%e 13, 29, 40, 40, 29, 13;

%e 17, 42, 69, 80, 69, 42, 17;

%e 19, 59, 111, 149, 149, 111, 59, 19;

%e 23, 78, 170, 260, 298, 260, 170, 78, 23;

%e 29, 101, 248, 430, 558, 558, 430, 248, 101, 29;

%e 31, 130, 349, 678, 988, 1116, 988, 678, 349, 130, 31;

%t 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 (Haskell)

%o a051599 n k = a051599_tabl !! n !! k

%o a051599_row n = a051599_tabl !! n

%o a051599_tabl = map fst $ iterate f ([2], a001223_list) where

%o f (row, (d:ds)) = (zipWith (+) ([d] ++ row) (row ++ [d]), ds)

%o -- _Reinhard Zumkeller_, Nov 23 2012

%Y Cf. A001223; A000040 (left and right edges), A053210 (row sums).

%K easy,nonn,tabl

%O 0,1

%A _Asher Auel_

%E Corrected by _James A. Sellers_, Dec 15 1999

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 15:18 EDT 2024. Contains 371960 sequences. (Running on oeis4.)