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.

A289501 Number of enriched p-trees of weight n.

This page as a plain text file.
%I A289501 #24 May 09 2021 07:56:55
%S A289501 1,1,2,4,12,32,112,352,1296,4448,16640,59968,231168,856960,3334400,
%T A289501 12679424,49991424,192890880,767229952,2998427648,12015527936,
%U A289501 47438950400,191117033472,760625733632,3082675150848,12346305839104,50223511928832,202359539335168
%N A289501 Number of enriched p-trees of weight n.
%C A289501 An enriched p-tree of weight n is either (case 1) the number n itself, or (case 2) a sequence of two or more enriched p-trees, having a weakly decreasing sequence of weights summing to n.
%H A289501 Alois P. Heinz, <a href="/A289501/b289501.txt">Table of n, a(n) for n = 0..1588</a>
%F A289501 O.g.f.: (1/(1-x) + Product_{i>0} 1/(1-a(i)*x^i))/2.
%e A289501 The a(4) = 12 enriched p-trees are:
%e A289501   4,
%e A289501   (31), ((21)1), (((11)1)1), ((111)1),
%e A289501   (22), (2(11)), ((11)2), ((11)(11)),
%e A289501   (211), ((11)11),
%e A289501   (1111).
%p A289501 b:= proc(n, i) option remember; `if`(n=0, 1,
%p A289501       `if`(i<1, 0, b(n, i-1)+a(i)*b(n-i, min(n-i, i))))
%p A289501     end:
%p A289501 a:= n-> `if`(n=0, 1, 1+b(n, n-1)):
%p A289501 seq(a(n), n=0..30);  # _Alois P. Heinz_, Jul 07 2017
%t A289501 a[n_]:=a[n]=1+Sum[Times@@a/@y,{y,Rest[IntegerPartitions[n]]}];
%t A289501 Array[a,20]
%t A289501 (* Second program: *)
%t A289501 b[n_, i_] := b[n, i] = If[n == 0, 1,
%t A289501      If[i<1, 0, b[n, i-1] + a[i] b[n-i, Min[n-i, i]]]];
%t A289501 a[n_] := If[n == 0, 1, 1 + b[n, n-1]];
%t A289501 a /@ Range[0, 30] (* _Jean-François Alcover_, May 09 2021, after _Alois P. Heinz_ *)
%o A289501 (PARI) seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 + polcoef(1/prod(k=1, n-1, 1 - v[k]*x^k + O(x*x^n)), n)); concat([1], v)} \\ _Andrew Howroyd_, Aug 26 2018
%Y A289501 Cf. A052337, A063834, A093637, A196545, A273873, A281145, A300660.
%K A289501 nonn
%O A289501 0,3
%A A289501 _Gus Wiseman_, Jul 07 2017