cp's OEIS Frontend

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.

A336902 Sum of the smallest parts of all compositions of n into distinct parts.

This page as a plain text file.
%I A336902 #15 Jul 12 2021 04:16:35
%S A336902 0,1,2,5,6,11,18,25,32,53,84,107,156,205,302,497,618,863,1206,1597,
%T A336902 2228,3569,4440,6191,8256,11329,14642,20477,30390,38555,52578,69625,
%U A336902 92696,122141,160500,211955,310476,386941,521102,678617,901386,1155383,1529742,1940749
%N A336902 Sum of the smallest parts of all compositions of n into distinct parts.
%H A336902 Alois P. Heinz, <a href="/A336902/b336902.txt">Table of n, a(n) for n = 0..5000</a>
%F A336902 a(n) == n (mod 2).
%e A336902 a(6) = 18 = 1 + 1 + 1 + 1 + 1 + 1 + 2 + 2 + 1 + 1 + 6: (1)23, (1)32, 2(1)3, 23(1), 3(1)2, 32(1), (2)4, 4(2), (1)5, 5(1), (6).
%p A336902 b:= proc(n, i, p) option remember; `if`(i*(i+1)/2<n or i<1, 0,
%p A336902      `if`(i=n, i*p!, b(n-i, min(n-i, i-1), p+1))+b(n, i-1, p))
%p A336902     end:
%p A336902 a:= n-> b(n$2, 1):
%p A336902 seq(a(n), n=0..50);
%t A336902 b[n_, i_, p_] := b[n, i, p] = If[i(i+1)/2 < n || i < 1, 0,
%t A336902      If[i == n, i*p!, b[n-i, Min[n-i, i-1], p+1]] + b[n, i-1, p]];
%t A336902 a[n_] := b[n, n, 1];
%t A336902 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Jul 12 2021, after _Alois P. Heinz_ *)
%Y A336902 Cf. A005895, A006128, A046746, A092265, A097939, A102712, A336903.
%K A336902 nonn
%O A336902 0,3
%A A336902 _Alois P. Heinz_, Aug 07 2020