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.
%I A166554 #17 Nov 30 2024 12:57:52 %S A166554 1,0,-2,-9,-40,-205,-1236,-8659,-69280,-623529,-6235300,-68588311, %T A166554 -823059744,-10699776685,-149796873604,-2246953104075,-35951249665216, %U A166554 -611171244308689,-11001082397556420,-209020565553571999 %N A166554 a(0)=1, a(n) = n*(a(n-1) - 1) for n>0. %H A166554 G. C. Greubel, <a href="/A166554/b166554.txt">Table of n, a(n) for n = 0..500</a> %F A166554 a(n) = -A038156(n) for n>0. %F A166554 a(n) = n! - floor(e*n!) + 1, n>0. - _Gary Detlefs_, Jun 06 2010 %F A166554 a(n) = (n+2)*a(n-1) - (2*n-1)*a(n-2) + (n-2)*a(n-3). - _R. J. Mathar_, Jul 28 2013 %t A166554 RecurrenceTable[{a[0]==1,a[n]==n(a[n-1]-1)},a[n],{n,20}] (* _Harvey P. Dale_, Jul 25 2011 *) %o A166554 (Magma) [n le 1 select 1 else (n-1)*(Self(n-1) - 1): n in [1..41]]; // _G. C. Greubel_, Nov 30 2024 %o A166554 (Python) %o A166554 def A166554(n): return 1 +factorial(n) -int(exp(1)*factorial(n)) +int(n==0) %o A166554 print([A166554(n) for n in range(41)]) # _G. C. Greubel_, Nov 30 2024 %Y A166554 Cf. A000142, A038156, A165793, A165814. %K A166554 sign %O A166554 0,3 %A A166554 _Philippe Deléham_, Oct 16 2009