OFFSET
4,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 4..1000
P. A. MacMahon, The divisors of numbers, Proc. London Math. Soc., (2) 19 (1921), 305-340; Coll. Papers II, pp. 267-302.
Index entries for linear recurrences with constant coefficients, signature (30,-385,2776,-12418,35908,-67818,82552,-62109,26190,-4725).
FORMULA
From Wolfdieter Lang, Apr 17 2017: (Start)
a(n) = A060187(n, 4), n >= 4, and 0 for n < 4,
a(n) = A060187(n, n-3), n >= 4, and 0 for n < 4.
O.g.f.: x^4*(1 + 46*x - 213*x^2 - 428*x^3 + 2295*x^4 - 1794*x^5 - 675*x^6) / Product_{j=0..3} (1 - (1+2*j)*x)^(4-j).
E.g.f.: (exp(7*x) - 7*x*exp(5*x) + (21*x^2/2)*exp(3*x) - (7*x^3/3!)*exp(x) - 1)/7. (End)
a(n) = Sum_{k=0..3} (-1)^k*binomial(n,k)*(7-2*k)^(n-1). - G. C. Greubel, Aug 01 2024
MAPLE
r := proc(n, k) option remember;
if n = 0 then if k = 0 then 1 else 0 fi else
(2*(n-k)+1)*r(n-1, k-1) + (2*k+1)*r(n-1, k) fi end:
MATHEMATICA
r[n_, k_] := r[n, k] = If[n == 0, If[k == 0, 1, 0], (2*(n-k)+1)*r[n-1, k-1] + (2*k+1)*r[n-1, k]]; A060189[n_] := r[n-1, 3]; Table[A060189[n], {n, 4, 21}] (* Jean-François Alcover, Dec 03 2013, translated from Peter Luschny's program *)
A060190[n_]:= Sum[(-1)^k*Binomial[n, k]*(7-2*k)^(n-1), {k, 0, 3}];
Table[A060190[n], {n, 4, 40}] (* G. C. Greubel, Aug 01 2024 *)
PROG
(Magma)
[(&+[(-1)^k*Binomial(n, k)*(7-2*k)^(n-1): k in [0..3]]): n in [4..40]]; // G. C. Greubel, Aug 01 2024
(SageMath)
[sum((-1)^k*binomial(n, k)*(7-2*k)^(n-1) for k in range(4)) for n in range(4, 40)] # G. C. Greubel, Aug 01 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 20 2001
EXTENSIONS
More terms from Vladeta Jovovic, Mar 20 2001
STATUS
approved