OFFSET
1,3
COMMENTS
Apart from initial terms, same as A001048. The number a(n) is the maximum of row n in the triangle of refined rencontres numbers A181897. - Tilman Piesk, Apr 02 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Jun Yan, Results on pattern avoidance in parking functions, arXiv:2404.07958 [math.CO], 2024. See p. 4.
FORMULA
a(1) = a(2) = 1; a(n) = n*(n-2)! = (n!)/(n-1) for n > 2. This is the number of (n-1)-cycles in S_n.
E.g.f.: -log(1-x) - x + 1/(1-x). [for a(n+1) - Michael Somos, Aug 26 2015]
E.g.f.: x - x^2/2 - x*log(1-x). - Michael Somos, Aug 26 2015
The sequence 1, 3, 8, ... has e.g.f. (1+x-x^2)/(1-x)^2 and a(n) = n!(n+2-0^n) = n!*A065475(n). - Paul Barry, May 14 2004
E.g.f.: E(0) - x, where E(k) = 1 + x/(k+1)/(1 - 1/(1 + 1/(k+1)/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Mar 27 2013
G.f.: 1 + x/Q(0), where Q(k)= 1 - x/(1+x) - x/(1+x)*(k+2)/(1 - x/(1+x)*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 22 2013
From Amiram Eldar, Jan 22 2023: (Start)
Sum_{n>=1} 1/a(n) = 5/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = 2/e - 1/2. (End)
EXAMPLE
a(3) = 3 because the largest conjugacy class in S_3 consists of the three 2-cycles {(12),(13),(23)}.
G.f. = x + x^2 + 3*x^3 + 8*x^4 + 30*x^5 + 144*x^6 + 840*x^7 + 5760*x^8 + ...
MAPLE
a := proc(n) if n<=2 then RETURN(1) else RETURN(n*(n-2)!) fi: end:for n from 1 to 40 do printf(`%d, `, a(n)) od:
MATHEMATICA
Join[{1, 1}, Table[n (n-2)!, {n, 3, 30}]] (* Harvey P. Dale, Oct 25 2011 *)
a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ x - x^2/2 - x Log[1 - x], {x, 0, n}]]; (* Michael Somos, Aug 26 2015 *)
a[ n_] := With[ {m = n - 1}, If[ m < 0, 0, m! SeriesCoefficient[ -Log[1 - x] - x + 1/(1 - x), {x, 0, m}]]]; (* Michael Somos, Aug 26 2015 *)
PROG
(Magma) [1, 1], [n*Factorial(n-2): n in [3..25]]; // Vincenzo Librandi, Oct 26 2011
(PARI) Vec(1+x*serlaplace((1+x-x^2)/(1-x)^2+O(x^66))) \\ Joerg Arndt, Mar 28 2013
(PARI) a(n)=if(n<=1, 1, n!/(n-1)); \\ Joerg Arndt, Mar 28 2013
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
Des MacHale, Feb 14 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Fabian Rothelius and James A. Sellers, Feb 15 2001
STATUS
approved