OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..445
FORMULA
For n >= 2, a(n) = floor(n*(3-e)*n!).
a(n) = n*A056543(n) - 1, n > 1. - Vladeta Jovovic, Apr 26 2003
From Peter Bala, Jul 09 2008: (Start)
In the following remarks we use an offset of 1, i.e., a(1) = 1, a(2) = 1, a(3) = 5, ... .
For n >= 2, a(n) = n*n!*Sum_{k = 2..n} 1/(k*(k-1)*k!).
For n >= 2, a(n) = 3*n*n! - Sum_{k = 0..n} (k+1)!*binomial(n,k).
Limit_{n -> oo} a(n)/(n*n!) = 3 - e.
E.g.f.: 1 + t + (3*t - exp(t))/(1-t)^2.
Recurrence relation: a(1) = 1, a(2) = 1, a(3) = 5, a(n) = (n+2)*a(n-1) - (n-1)*a(n-2) for n >= 4.
Recurrence relation: a(1) = 1, a(2) = 1, a(n) = (n^2*a(n-1) + 1)/(n-1) for n >= 2.
MAPLE
a:= n -> n*n!*add(1/(k*(k-1)*k!), k = 2..n): seq(a(n), n = 2..20); # Peter Bala, Jul 09 2008
MATHEMATICA
a[n_]:= a[n]= If[n<3, 1, -1 +n*Sum[a[j], {j, n-1}]];
Table[a[n], {n, 40}] (* G. C. Greubel, Feb 03 2024 *)
PROG
(Magma) [n le 2 select 1 else (n^2*Self(n-1) +1)/(n-1): n in [1..30]]; // G. C. Greubel, Feb 03 2024
(SageMath)
@CachedFunction # a = A082425
def a(n): return 1 if (n==1) else -1 + n*sum(a(j) for j in range(1, n))
[a(n) for n in range(1, 41)] # G. C. Greubel, Feb 03 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 24 2003
EXTENSIONS
Offset corrected by G. C. Greubel, Feb 03 2024
STATUS
approved