Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Mar 23 2018 06:00:08
%S 1,1,1,2,2,4,4,7,8,12,12,21,21,29,33,46,46,67,67,93,101,125,125,177,
%T 181,223,238,300,300,394,394,488,512,604,620,796,796,930,972,1182,
%U 1182,1450,1450,1712,1804,2054,2054,2510,2526,2924,3016,3483,3483
%N Number of ways to write n as an lterm, where an lterm is an unordered sum which is either 2, or 1 + an ordered product of lterms.
%H Michael De Vlieger, <a href="/A050366/b050366.txt">Table of n, a(n) for n = 2..10000</a>
%F Shifts left under transform T where Ta has Dirichlet g.f.: 1/(1-A(s)).
%e The different ways of writing the numbers 2 through 7 as lterms are:
%e 2 = 2,
%e 3 = 1 + 2,
%e 4 = 1 + (1+2),
%e 5 = 1 + (1+1+2) = 1 + 2*2,
%e 6 = 1 + (1+1+1+2) = 1 + (1+2*2),
%e 7 = 1 + (1+1+1+1+2) = 1 + (1+1+2*2) = 1 + 2*(1+2) = 1 + (1+2)*2.
%t Fold[Function[{a, n}, Append[a, DivisorSum[n, a[[#]] a[[n/# - 1]] &, # < n &]]], {1}, Range[2, 53]] (* _Michael De Vlieger_, Mar 14 2018 *)
%o (PARI) a(n)=if(n<2,1,sumdiv(n,d,if(d<n,a(d)*a(n/d-1),0))) \\ _Benoit Cloitre_, Mar 13 2018
%Y Cf. A002033, A050318, A050319, A050365.
%K nonn,eigen
%O 2,4
%A _Christian G. Bower_, Oct 15 1999