login
Final number of terms obtained with Euler's recurrence formula when computing the sum of divisors of n.
1

%I #17 Sep 23 2018 22:28:21

%S 1,2,3,5,9,15,27,46,80,138,238,413,713,1235,2136,3695,6393,11057,

%T 19130,33091,57246,99032,171315,296365,512682,886902,1534266,2654154,

%U 4591475,7942870,13740526,23769981,41120131,71134474,123056829,212878289,368262059,637063333

%N Final number of terms obtained with Euler's recurrence formula when computing the sum of divisors of n.

%C It appears that a(n) is the number of compositions of n whose parts are pentagonal numbers. See Neville link. - _Michel Marcus_, Jul 28 2017

%H Leonhard Euler, Jordan Bell, <a href="http://arxiv.org/abs/math/0507201">A demonstration of a theorem on the order observed in the sums of divisors</a>, arXiv:math/0507201 [math.HO], 2005-2009.

%H Leonhard Euler, Jordan Bell, <a href="http://arxiv.org/abs/math/0411587">An observation on the sums of divisors</a>, arXiv:math/0411587 [math.HO], 2004-2009.

%H N. Robbins, <a href="http://ac.inf.elte.hu/Vol_043_2014/239_43.pdf">On compositions whose parts are polygonal numbers</a>, Annales Univ. Sci. Budapest., Sect. Comp. 43 (2014) 239-243. See p. 242.

%e For n=5, start with row 5 of A195310: [4, 3, 0]. Then replace 4 by row 4: [3, 2], replace 3 by row 3: [2, 1]. The row is now [3, 2, 2, 1, 0].

%e Repeat process until all terms are 0: [4, 3, 0], [3, 2, 2, 1, 0], [2, 1, 1, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0].

%e The final array has 9 items, hence a(5) = 9.

%t rows = 30;

%t gpenta[n_] := If[EvenQ[n], n(3n/2+1)/4, (n+1)(3n+1)/8];

%t T[n_, k_] := n - gpenta[k];

%t Do[row[n] = DeleteCases[Table[T[n, k], {k, n}], _?Negative], {n, rows}];

%t a[n_] := a[n] = row[n] //. j_?Positive :> Sequence @@ row[j] // Length;

%t Table[Print["a(", n, ") = ", a[n]]; a[n], {n, rows}] (* _Jean-François Alcover_, Sep 22 2018 *)

%o (PARI)

%o A001318(n) = { return((3*n^2 + 2*n + (n%2) * (2*n + 1)) / 8);}

%o A195310(n) = {if (n == 0, return ([0])); nb = 1; vec = vector(0); nn = n; while (nn >=0, nn = n - A001318(nb); if (nn >=0, vec = concat(vec, nn)); nb++;); return(vec);}

%o A190138(m) = { vval = vector(m); for (n=1, m, vec = A195310(n); svec = 0; for (k=1, length(vec), if (vec[k] == 0, svec += 1, svec += vval[vec[k]]);); vval[n] = svec;); for (n=1, m, print1(vval[n], ", "););}

%Y Cf. A000203, A001318, A195310.

%K nonn

%O 1,2

%A _Michel Marcus_, Dec 19 2012