OFFSET
0,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16796
FORMULA
EXAMPLE
MATHEMATICA
A236855list[m_] := With[{r = 2*Range[2, m]-1}, Reverse[Map[Total[r-#] &, Select[Subsets[Range[2, 2*m-1], {m-1}], Min[r-#] >= 0 &]]]];
A236855list[6] (* Generates C(6) terms *) (* Paolo Xausa, Feb 19 2024 *)
PROG
(Scheme)
(define (A236855 n) (apply + (A239903raw n)))
(define (A239903raw n) (if (zero? n) (list) (let loop ((n n) (row (- (A081288 n) 1)) (col (- (A081288 n) 2)) (srow (- (A081288 n) 2)) (catstring (list 0))) (cond ((or (zero? row) (negative? col)) (reverse! (cdr catstring))) ((> (A009766tr row col) n) (loop n srow (- col 1) (- srow 1) (cons 0 catstring))) (else (loop (- n (A009766tr row col)) (+ row 1) col srow (cons (+ 1 (car catstring)) (cdr catstring))))))))
;; Alternative definition:
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Apr 18 2014
STATUS
approved