login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = 1 + Sum_{i=2..n-1} n*a(i).
1

%I #37 Sep 08 2022 08:45:31

%S 1,1,1,4,21,131,943,7701,70409,712891,7921011,95844233,1254688141,

%T 17670191319,266412115271,4281623281141,73073037331473,

%U 1319881736799731,25155393101359579,504505383866156001,10621165976129600021,234196709773657680463,5397676549069062730671

%N a(n) = 1 + Sum_{i=2..n-1} n*a(i).

%C a(n) = 1 + Sum_{i=2..n-1} 1*a(i) = 2^n; a(n) = 1 + Sum_{i=2..n-1} 2*a(i) = 3^n; etc. It seems that a(n+1)/(n*a(n)) -> 1 for n -> oo. [Comment corrected by _Emeric Deutsch_, Aug 10 2007]

%C Let M(n) denote the n X n matrix with ones along the subdiagonal, ones everywhere above the main diagonal, the integers 4, 5, etc., along the main diagonal, and zeros everywhere else. Then a(n) equals the permanent of M(n-2) for n >= 3. - _John M. Campbell_, Apr 20 2021

%H Alois P. Heinz, <a href="/A131965/b131965.txt">Table of n, a(n) for n = 0..449</a>

%F a(n) = 1 + Sum_{i=2..n-1} n*a(i).

%F E.g.f.: 1/2 * (x + (2*exp(x)-5)/(x-1)^2 -5/(x-1)).

%F Asymptotic expansion: a(n)/n! = (5/2 + e)*n^2 + O(n).

%F a(n) = (n+1)*a(n-1) + a(n-2) + ... + a(2), e.g., a(5) = 6*21 + 4 + 1 = 131.

%e a(4)=21 because 1 + 4*1 + 4*4 = 21.

%p rctlnn := proc(n::nonnegint) local j; option remember; if n = 0 then 0; else 1+add(n*procname(j), j=2..n-1); end if; end proc:

%p a[1] := 1; for n from 2 to 18 do a[n] := 1+sum(n*a[i], i = 2 .. n-1) end do: seq(a[n], n = 1 .. 18); # _Emeric Deutsch_, Aug 10 2007

%p # third Maple program:

%p a:= proc(n) option remember;

%p 1+add(n*a(i), i=2..n-1)

%p end:

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Sep 03 2020

%t a[1] = a[2] = 1; a[n_] := a[n] = (n^2*a[n-1]-1)/(n-1); Array[a, 30] (* _Jean-François Alcover_, Feb 08 2017 *)

%o (Magma) m:=25; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (-8*(1+x) + 2*(3-x)*Exp(x) + (4+3*x^2-x^3))/(2*(1-x)^3) )); [Factorial(n-1)*b[n]: n in [1..m]]; // _G. C. Greubel_, Mar 09 2019

%o (Sage) m = 25; T = taylor((-8*(1+x) + 2*(3-x)*exp(x) + (4+3*x^2-x^3))/(2*(1-x)^3), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # _G. C. Greubel_, Mar 09 2019

%Y Cf. A131407, A131408, A079750.

%K nonn

%O 0,4

%A _Thomas Wieder_, Aug 02 2007

%E More terms from _Emeric Deutsch_, Aug 10 2007

%E a(0)=1 prepended and edited by _Alois P. Heinz_, Sep 03 2020