login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A140685
Triangle T(n,k) read by rows: T(n,k) = 1 if n is odd and k=(n-1)/2; T(n,k) = 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
OFFSET
1,2
COMMENTS
Row sums give A042948.
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;
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
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