%I #44 Sep 08 2022 08:44:45
%S 1,1,3,11,47,239,1439,10079,80639,725759,7257599,79833599,958003199,
%T 12454041599,174356582399,2615348735999,41845579775999,
%U 711374856191999,12804747411455999,243290200817663999,4865804016353279999
%N a(0) = 1, a(1) = 1, a(n+1) = (n+1)*a(n) + n.
%C First Bernoulli polynomial evaluated at x=n! and multiplied by 2.
%C From _Jaroslav Krizek_, Jan 23 2010: (Start)
%C a(0) = 1, for n >= 1: a(n) = numbers m for which there is one iteration {floor(r/k)} for k = n, n-1, n-2, ... 1 with property r mod k = k-1 starting at r = m.
%C For n = 5: a(5) = 239;
%C floor(239/5) = 47, 239 mod 5 = 4;
%C floor( 47/4) = 11, 47 mod 4 = 3;
%C floor( 11/3) = 3, 11 mod 3 = 2;
%C floor( 3/2) = 1, 3 mod 2 = 1;
%C floor( 1/1) = 1, 1 mod 1 = 0. (End)
%C With offset 1, is the eigensequence of a triangle with the natural numbers (1, 2, 3, ...) as the right border, (1, 1, 2, 3, 4, ...) as the left border; and the rest zeros. - _Gary W. Adamson_, Aug 01 2016
%H Vincenzo Librandi, <a href="/A020543/b020543.txt">Table of n, a(n) for n = 0..200</a>
%H Daniel Birmajer, Juan B. Gil, David S. Kenepp, and Michael D. Weiner, <a href="https://arxiv.org/abs/2108.04302">Restricted generating trees for weak orderings</a>, arXiv:2108.04302 [math.CO], 2021.
%H <a href="/index/Be#Bernoulli">Index entries for sequences related to Bernoulli numbers.</a>
%F E.g.f.: (-2 + exp(x) - x*exp(x))/(1-x). - _Ralf Stephan_, Feb 18 2004
%F a(n) = 2*n! - 1. - _Gary W. Adamson_, Jan 07 2008
%F a(0) = a(1) = 1, a(n) = a(n-1) * n + (n-1) for n >= 2. - _Jaroslav Krizek_, Jan 23 2010
%F a(n) ~ 2*sqrt(2*Pi*n)*n^n/exp(n). - _Ilya Gutkovskiy_, Aug 02 2016
%t lst={1};s=1;Do[s+=(n+=s*n);AppendTo[lst, s], {n, 0, 5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Oct 10 2008 *)
%t FoldList[#1*#2 + #2 - 1 &, 1, Range[20]] (* _Robert G. Wilson v_, Jul 07 2012 *)
%t Table[2 n! - 1, {n, 0, 25}] (* _Vincenzo Librandi_, Sep 30 2013 *)
%o (Magma) [2*Factorial(n)-1: n in [0..25]]; // _Vincenzo Librandi_, Sep 30 2013
%Y Cf. A052898(n) - 2.
%Y Cf. sequences of the type k*n!-1: A033312 (k=1), this sequence, A173323 (k=3), A173321 (k=4), A173317 (k=5), A173316 (k=6).
%K nonn
%O 0,3
%A _Simon Plouffe_
%E Better description from _Benoit Cloitre_, Dec 29 2001