This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A190138 #17 Sep 23 2018 22:28:21 %S A190138 1,2,3,5,9,15,27,46,80,138,238,413,713,1235,2136,3695,6393,11057, %T A190138 19130,33091,57246,99032,171315,296365,512682,886902,1534266,2654154, %U A190138 4591475,7942870,13740526,23769981,41120131,71134474,123056829,212878289,368262059,637063333 %N A190138 Final number of terms obtained with Euler's recurrence formula when computing the sum of divisors of n. %C A190138 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 A190138 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 A190138 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 A190138 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 A190138 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 A190138 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 A190138 The final array has 9 items, hence a(5) = 9. %t A190138 rows = 30; %t A190138 gpenta[n_] := If[EvenQ[n], n(3n/2+1)/4, (n+1)(3n+1)/8]; %t A190138 T[n_, k_] := n - gpenta[k]; %t A190138 Do[row[n] = DeleteCases[Table[T[n, k], {k, n}], _?Negative], {n, rows}]; %t A190138 a[n_] := a[n] = row[n] //. j_?Positive :> Sequence @@ row[j] // Length; %t A190138 Table[Print["a(", n, ") = ", a[n]]; a[n], {n, rows}] (* _Jean-François Alcover_, Sep 22 2018 *) %o A190138 (PARI) %o A190138 A001318(n) = { return((3*n^2 + 2*n + (n%2) * (2*n + 1)) / 8);} %o A190138 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 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 A190138 Cf. A000203, A001318, A195310. %K A190138 nonn %O A190138 1,2 %A A190138 _Michel Marcus_, Dec 19 2012