login
A198630
Alternating sums of powers of 1,2,...,7.
1
1, 4, 28, 208, 1540, 11344, 83188, 607408, 4416580, 31986064, 230784148, 1659338608, 11892395620, 84983496784, 605698755508, 4306834677808, 30560156566660, 216449743135504, 1530600006189268, 10808335215521008, 76230379263297700, 537081363012854224, 3780565969722557428
OFFSET
0,2
COMMENTS
For the e.g.f.s and o.g.f.s of such alternating power sums see A196847 (even case) and A196848 (odd case).
LINKS
Index entries for linear recurrences with constant coefficients, signature (28,-322,1960,-6769,13132,-13068,5040).
FORMULA
a(n) = Sum_{j=1..7} (-1)^(j+1)*j^n.
E.g.f.: Sum_{j=1..7} ((-1)^(j+1))*exp(j*x) = exp(x)*(1+exp(7*x))/(1+exp(x)).
O.g.f.: Sum_{j=1..7} ((-1)^(j+1))/(1 - j*x).
O.g.f.: (1-24*x+238*x^2-1248*x^3+3661*x^4-5736*x^5+3828*x^6)/(Product_{j=1..7} (1-j*x)). See A196848 for a formula for the coefficients of the numerator polynomial.
EXAMPLE
a(2) = 1^2-2^2+3^2-4^2+5^2-6^2+7^2 = 28.
MAPLE
A198630 := proc(n)
3^n-4^n+1-2^n+5^n-6^n+7^n ;
end proc:
seq(A198630(n), n=0..20) ; # R. J. Mathar, May 11 2022
PROG
(PARI) a(n)=([0, 1, 0, 0, 0, 0, 0; 0, 0, 1, 0, 0, 0, 0; 0, 0, 0, 1, 0, 0, 0; 0, 0, 0, 0, 1, 0, 0; 0, 0, 0, 0, 0, 1, 0; 0, 0, 0, 0, 0, 0, 1; 5040, -13068, 13132, -6769, 1960, -322, 28]^n*[1; 4; 28; 208; 1540; 11344; 83188])[1, 1] \\ Charles R Greathouse IV, Jul 06 2017
(PARI) a(n) = sum(j=1, 7, (-1)^(j+1)*j^n) \\ Andrew Howroyd, Nov 09 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Oct 28 2011
EXTENSIONS
a(17) onward from Andrew Howroyd, Nov 09 2025
STATUS
approved