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 A339442 #11 Mar 14 2021 11:58:47 %S A339442 0,1,0,1,0,0,1,0,0,0,7,0,0,0,6,1,0,6,0,12,0,1,6,0,6,6,6,0,13,0,6,6,12, %T A339442 0,6,126,1,18,0,12,6,126,6,6,12,7,132,6,120,18,126,0,24,246,12,127, %U A339442 126,126,12,132,126,138,126,132,12,246,133,138,366,6,258,252 %N A339442 Number of compositions (ordered partitions) of n into an odd number of distinct triangular numbers. %H A339442 Alois P. Heinz, <a href="/A339442/b339442.txt">Table of n, a(n) for n = 0..10000</a> %H A339442 <a href="/index/Com#comp">Index entries for sequences related to compositions</a> %H A339442 <a href="/index/Pol#polygonal_numbers">Index to sequences related to polygonal numbers</a> %e A339442 a(19) = 12 because we have [15, 3, 1] (6 permutations) and [10, 6, 3] (6 permutations). %p A339442 b:= proc(n, i, p) option remember; `if`(n=0, irem(p, 2)*p!, (t-> %p A339442 `if`(t>n, 0, b(n, i+1, p)+b(n-t, i+1, p+1)))(i*(i+1)/2)) %p A339442 end: %p A339442 a:= n-> b(n, 1, 0): %p A339442 seq(a(n), n=0..100); # _Alois P. Heinz_, Dec 05 2020 %t A339442 b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[p, 2]*p!, With[{t = i(i+1)/2}, If[t > n, 0, b[n, i + 1, p] + b[n - t, i + 1, p + 1]]]]; %t A339442 a[n_] := b[n, 1, 0]; %t A339442 a /@ Range[0, 100] (* _Jean-François Alcover_, Mar 14 2021, after _Alois P. Heinz_ *) %Y A339442 Cf. A000217, A331843, A332304, A339376, A339417, A339441. %K A339442 nonn %O A339442 0,11 %A A339442 _Ilya Gutkovskiy_, Dec 05 2020