The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A140685 Triangle T(n,k) read by rows: T = 1 if n is odd and k=(n-1)/2; T = 2 otherwise. 4
 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Row sums are A042948(n). The n-th row can also be described as the coefficient [x^k] of the sum of polynomials x^(m-1) placed on the main and secondary diagonal (in X-shaped pattern) of the m-th row of an n X n matrix:   x^0   0    0    0   ...   0    0   x^0    0   x^1   0    0   ...   0   x^1   0    0    0   x^2   0   ...  x^2   0    0   ... The details of the crossing in the center of this matrix depend on whether n is even or odd. Triangle is read by rows as T(1,0); T(2,0), T(2,1); T(3,0), T(3,1), T(3,2); T(4,0), T(4,1), T(4,2), T(4,3); ... - Antti Karttunen, Oct 10 2017 LINKS EXAMPLE The triangle starts in row n=1 with columns 0 <= k < n as:   1;   2, 2;   2, 1, 2;   2, 2, 2, 2;   2, 2, 1, 2, 2;   2, 2, 2, 2, 2, 2;   2, 2, 2, 1, 2, 2, 2;   2, 2, 2, 2, 2, 2, 2, 2;   2, 2, 2, 2, 1, 2, 2, 2, 2;   2, 2, 2, 2, 2, 2, 2, 2, 2, 2; MATHEMATICA Clear[M, y, x] M[d_, x_, y_] := Sum[Sum[If[n == m, 1, If[n == d - m + 1, 1, 0]]*x^(n - 1)*y^(m - 1), {n, 1, d}], {m, 1, d}] Table[CoefficientList[M[d, x, 1], x], {d, 1, 10}]; Flatten[%] PROG (Scheme) (define (A140685 n) (A140685tr (A002024 n) (- (A002260 n) 1))) (define (A140685tr n k) (if (and (odd? n) (= k (/ (- n 1) 2))) 1 2)) CROSSREFS Cf. A002024, A002260, A104041. Sequence in context: A276788 A282625 A026498 * A055666 A251139 A195061 Adjacent sequences:  A140682 A140683 A140684 * A140686 A140687 A140688 KEYWORD nonn,tabl,easy AUTHOR Roger L. Bagula and Mats Granvik, Jul 11 2008 EXTENSIONS Definition simplified by the Assoc. Eds. of the OEIS, Oct 12 2010 More terms from Antti Karttunen, Oct 10 2017 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 2 16:17 EST 2021. Contains 349445 sequences. (Running on oeis4.)