function [M] = A367196(nmax) % Returns the first "nmax" terms of A367196. K=zeros(nmax,1); K(1:2,:)=[1;1]; for n=3:nmax clc n k=1; z=1; while z==1 z=0; for a=2:n-2 for b=max(n-a+1,a+1):n-1 [a b n]; T=sort([K(a),K(b),k]); if T(1)+T(2)>T(3) k=k+((T(1)+T(2))-T(3)); z=1; break end end end end K(n)=k; end N=(1:nmax)'; M=[N K] end