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.

A153229 a(0) = 0, a(1) = 1, and for n >= 2, a(n) = (n-1) * a(n-2) + (n-2) * a(n-1).

This page as a plain text file.
%I A153229 #48 Dec 06 2024 11:10:22
%S A153229 0,1,0,2,4,20,100,620,4420,35900,326980,3301820,36614980,442386620,
%T A153229 5784634180,81393657020,1226280710980,19696509177020,335990918918980,
%U A153229 6066382786809020,115578717622022980,2317323290554617020,48773618881154822980,1075227108896452857020
%N A153229 a(0) = 0, a(1) = 1, and for n >= 2, a(n) = (n-1) * a(n-2) + (n-2) * a(n-1).
%C A153229 Previous name was: Weighted Fibonacci numbers.
%C A153229 From _Peter Bala_, Aug 18 2013: (Start)
%C A153229 The sequence occurs in the evaluation of the integral I(n) := Integral_{u >= 0} exp(-u)*u^n/(1 + u) du.
%C A153229 The result is I(n) = A153229(n) + (-1)^n*I(0), where I(0) = Integral_{u >= 0} exp(-u)/(1 + u) du = 0.5963473623... is known as Gompertz's constant. See A073003.
%C A153229 Note also that I(n) = n!*Integral_{u >= 0} exp(-u)/(1 + u)^(n+1) du. (End)
%C A153229 ((-1)^(n+1))*a(n) = p(n,-1), where the polynomials p are defined at A248664. - _Clark Kimberling_, Oct 11 2014
%H A153229 Alois P. Heinz, <a href="/A153229/b153229.txt">Table of n, a(n) for n = 0..200</a>
%F A153229 a(0) = 0, a(1) = 1, and for n >= 2, a(n) = (n-1) * a(n-2) + (n-2) * a(n-1).
%F A153229 For n>=1, a(n) = A058006(n-1) * (-1)^(n-1).
%F A153229 G.f.: G(0)*x/(1+x)/2, where G(k)= 1 + 1/(1 - x*(k+1)/(x*(k+1) + 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 24 2013
%F A153229 G.f.: 2*x/(1+x)/G(0), where G(k)= 1 + 1/(1 - 1/(1 - 1/(2*x*(k+1)) + 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 29 2013
%F A153229 G.f.: W(0)*x/(1+sqrt(x))/(1+x), where W(k) = 1 + sqrt(x)/( 1 - sqrt(x)*(k+1)/(sqrt(x)*(k+1) + 1/W(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Aug 17 2013
%F A153229 a(n) ~ (n-1)! * (1 - 1/n + 1/n^3 + 1/n^4 - 2/n^5 - 9/n^6 - 9/n^7 + 50/n^8 + 267/n^9 + 413/n^10), where numerators are Rao Uppuluri-Carpenter numbers, see A000587. - _Vaclav Kotesovec_, Mar 16 2015
%F A153229 E.g.f.: exp(1)/exp(x)*(Ei(1, 1-x)-Ei(1, 1)). - _Alois P. Heinz_, Jul 05 2018
%F A153229 a(n) = Sum_{k = 0..n-1} (-1)^(n-k-1) * k!. - _Peter Bala_, Dec 05 2024
%e A153229 a(20) = 19 * a(18) + 18 * a(19) = 19 * 335990918918980 + 18 * 6066382786809020 = 6383827459460620 + 109194890162562360 = 115578717622022980
%p A153229 t1 := sum(n!*x^n, n=0..100): F := series(t1/(1+x), x, 100): for i from 0 to 40 do printf(`%d, `, i!-coeff(F, x, i)) od: # _Zerinvary Lajos_, Mar 22 2009
%p A153229 # second Maple program:
%p A153229 a:= proc(n) a(n):= `if`(n<2, n, (n-1)*a(n-2) +(n-2)*a(n-1)) end:
%p A153229 seq(a(n), n=0..25); # _Alois P. Heinz_, May 24 2013
%t A153229 Join[{a = 0}, Table[b = n! - a; a = b, {n, 0, 100}]] (* _Vladimir Joseph Stephan Orlovsky_, Jun 28 2011 *)
%t A153229 RecurrenceTable[{a[0]==0,a[1]==1,a[n]==(n-1)a[n-2]+(n-2)a[n-1]},a,{n,30}] (* _Harvey P. Dale_, May 01 2020 *)
%o A153229 (C) unsigned long a(unsigned int n) {
%o A153229 if (n == 0) return 0;
%o A153229 if (n == 1) return 1;
%o A153229 return (n - 1) * a(n - 2) + (n - 2) * a(n - 1); }
%o A153229 (PARI) a(n)=if(n,my(t=(-1)^n);-t-sum(i=1,n-1,t*=-i),0); \\ _Charles R Greathouse IV_, Jun 28 2011
%Y A153229 Cf. A000045, A000255, A000587, A058006.
%Y A153229 First differences of A136580.
%Y A153229 Column k=0 of A303697 (for n>0).
%K A153229 nonn,easy
%O A153229 0,4
%A A153229 Shaojun Ying (dolphinysj(AT)gmail.com), Dec 21 2008
%E A153229 Edited by _Max Alekseyev_, Jul 05 2010
%E A153229 Better name by _Joerg Arndt_, Aug 17 2013