%I #12 Feb 12 2021 15:22:08
%S 1,2,3,3,4,4,4,4,5,5,4,5,5,6,5,5,5,6,6,6,6,5,5,6,7,6,7,6,5,5,6,7,7,7,
%T 7,6,5,6,6,7,7,8,7,7,6,6,6,7,7,7,8,8,7,7,7,6,5,7,8,7,8,8,8,7,8,7,5,6,
%U 6,8,8,8,8,8,8,8,8,6,6,6,7,7,8,9,8,8,8
%N a(0) = 1; for n > 0, a(n) = a(k) + a(m) where binomial(k + m + 2, 2) - m = n and binomial(k + m + 2, 2) is the smallest triangular number larger than or equal to m.
%H Rémy Sigrist, <a href="/A290021/b290021.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n+1) = a(A002262(n)) + a(A025581(n)). - _Rémy Sigrist_, Feb 12 2021
%e a(0) = 1.
%e a(1) = a(0) + a(0) = 1 + 1 = 2.
%e a(2) = a(0) + a(1) = 1 + 2 = 3.
%e a(3) = a(1) + a(0) = 2 + 1 = 3.
%e a(4) = a(0) + a(2) = 1 + 3 = 4.
%e a(5) = a(1) + a(1) = 2 + 2 = 4.
%e a(6) = a(2) + a(0) = 3 + 1 = 4.
%o (PARI) a(n) = {if(n==0, return(1)); my(s = ceil((-3 + sqrt(8*n+1))/ 2), b = binomial(s+2, 2), k = b - n, m = s - k); a(k) + a(m)}
%o (PARI) a=vector(87); print1(a[u=1]=1); for (d=1, oo, for (n=1, d, print1(", "a[u++]=a[n]+a[d+1-n]); if (u==87, break (2)))) \\ _Rémy Sigrist_, Feb 12 2021
%Y Cf. A002262, A025581.
%K nonn,easy
%O 0,2
%A _David A. Corneth_, Aug 25 2017