login
Minimal number of Catalan numbers that sum to n.
13

%I #19 Jul 02 2014 17:01:32

%S 0,1,1,2,2,1,2,2,3,3,2,3,3,4,1,2,2,3,3,2,3,3,4,4,3,4,4,5,2,3,3,4,4,3,

%T 4,4,5,5,4,5,5,6,1,2,2,3,3,2,3,3,4,4,3,4,4,5,2,3,3,4,4,3,4,4,5,5,4,5,

%U 5,6,3,4,4,5,5,4,5,5,6,6,5,6,6,7,2,3,3,4,4,3,4,4,5,5,4,5,5,6,3

%N Minimal number of Catalan numbers that sum to n.

%H Olivier Gérard (first 1001 terms) & Antti Karttunen, <a href="/A014420/b014420.txt">Table of n, a(n) for n = 0..16796</a>

%F a(0) = 0, a(n) = 1 + a(n-A081290(n)). - _Antti Karttunen_, Jul 02 2014

%o (Scheme, with memoization macro definec from Antti Karttunen's IntSeq-library)

%o (definec (A014420 n) (if (zero? n) n (+ 1 (A014420 (- n (A081290 n))))))

%o ;; Other version, requiring A014418raw given in A014418:

%o (define (A014420 n) (apply + (A014418raw n)))

%o ;; _Antti Karttunen_, Jul 02 2014

%Y Cf. A014418, A081290, A244320, A244318, A244232, A236855, A236859.

%K nonn,easy

%O 0,4

%A _Olivier Gérard_