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!)
A033540 a(n+1) = n*(a(n) + 1) for n >= 1, a(1) = 1. 15
1, 2, 6, 21, 88, 445, 2676, 18739, 149920, 1349289, 13492900, 148421911, 1781062944, 23153818285, 324153456004, 4862301840075, 77796829441216, 1322546100500689, 23805829809012420, 452310766371235999, 9046215327424720000, 189970521875919120021 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
David Carlson, Sophomores meet the traveling salesperson problem, Journal of Computing Sciences in Colleges, 33(3), 126-133, 2018. See proof of the formula by Benoit Cloitre.
Neil Sloane and Brady Haran, A Sequence with a Mistake, Numberphile video (2021).
FORMULA
a(n) = n!*(1 +1/0! +1/1! +...+ 1/(n-1)!). - Jon Bentley (jlb(AT)research.bell-labs.com)
For n>=1, a(n+1) = floor((1+e)*n!) - 1. - Benoit Cloitre, Sep 07 2002
From Vladeta Jovovic, Feb 02 2003: (Start)
a(n) = n! + A007526(n).
E.g.f.: (1+x*exp(x))/(1-x). (End)
a(n) = (n+1)*a(n-1) - (2*n-3)*a(n-2) + (n-3)*a(n-3) for n>=4. - Jaume Oliver Lafont, Sep 11 2009
a(n) = n! + floor(e*n!) - 1, n>0. - Gary Detlefs, Jun 06 2010
MAPLE
seq(coeff(series( (1+x*exp(x))/(1-x), x, n+1)*n!, x, n), n = 0..30); # G. C. Greubel, Oct 13 2019
# second Maple program:
a:= proc(n) option remember;
`if`(n=1, 1, (n-1)*(a(n-1)+1))
end:
seq(a(n), n=1..23); # Alois P. Heinz, May 12 2021
MATHEMATICA
FoldList[#1*#2 + #2 &, 1, Range[19]] (* Robert G. Wilson v, Jul 07 2012 *)
nxt[{a_, n_}]:={n(a+1), n+1}; Transpose[NestList[nxt, {1, 1}, 20]][[1]] (* Harvey P. Dale, Jun 20 2014 *)
PROG
(Magma) I:=[1, 2, 6]; [n le 3 select I[n] else (n+1)*Self(n-1)-(2*n-3)*Self(n-2)+(n-3)*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 21 2014
(PARI) my(x='x+O('x^30)); Vec(serlaplace( (1+x*exp(x))/(1-x) )) \\ G. C. Greubel, Oct 13 2019
(Sage) [factorial(n)*( (1+x*exp(x))/(1-x) ).series(x, n+1).list()[n] for n in (0..30)] # G. C. Greubel, Oct 13 2019
(GAP) a:=[1, 2, 6];; for n in [4..30] do a[n]:=(n+1)*a[n-1]-(2*n-3)*a[n-2] +(n-3)*a[n-3]; od; a; # G. C. Greubel, Oct 13 2019
CROSSREFS
Sequence in context: A150227 A263852 A189243 * A177479 A367100 A147719
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

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 May 6 13:11 EDT 2024. Contains 372293 sequences. (Running on oeis4.)