login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A147794 Number of nodes at n-th level in tree in which top node is 1; each node k has children labeled 1, 2, ..., k*(k+1) at next level. 3

%I #8 Feb 01 2024 15:00:00

%S 1,2,8,120,40456,14354709112,10145806838546891496456,

%T 43814454551364119293851205505402899467594454136,

%U 12230705010706858303154182089533811056819321112988144670126813673854225371091425006635639297686024

%N Number of nodes at n-th level in tree in which top node is 1; each node k has children labeled 1, 2, ..., k*(k+1) at next level.

%C See the reference in A058311 for a better way to compute this!

%p M:=4;

%p L[0]:=[1]; a[0]:=1;

%p for n from 1 to M do

%p L[n]:=[];

%p t1:=L[n-1];

%p tc:=nops(t1);

%p for i from 1 to tc do

%p t2:=t1[i];

%p for j from 1 to t2*(t2+1) do

%p L[n]:=[op(L[n]),j]; od:

%p a[n]:=nops(L[n]);

%p #lprint(n,L[n],a[n]);

%p od:

%p od:

%p [seq(a[n],n=0..M)];

%p p := proc(n,k) option remember; local j ; if n = 1 then k*(k+1); else sum( procname(n-1,j),j=1..k*(k+1)) ; fi; expand(%) ; end: A147794 := proc(n) if n = 0 then 1 ; else subs(k=1, p(n,k)) ; fi; end: for n from 0 do printf("%d,\n", A147794(n)) ; od: # _R. J. Mathar_, May 04 2009

%t p[n_, k_] := p[n, k] = If[n == 1, k (k + 1), Sum[p[n - 1, j], {j, 1, k (k + 1)}]];

%t a[n_] := If[n == 0, 1, p[n, 1]];

%t Table[Print[n, " ", a[n]]; a[n], {n, 0, 7}] (* _Jean-François Alcover_, Feb 01 2024, after _R. J. Mathar_ *)

%Y A variant of A058311. Cf. A147780.

%K nonn

%O 0,2

%A _N. J. A. Sloane_, May 03 2009

%E More terms from _R. J. Mathar_, May 04 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:25 EDT 2024. Contains 371971 sequences. (Running on oeis4.)