login
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