A099586 Constant term in (1+x)^n mod (1+x^4).
1, 1, 1, 0, -4, -14, -34, -68, -116, -164, -164, 0, 560, 1912, 4616, 9232, 15760, 22288, 22288, 0, -76096, -259808, -627232, -1254464, -2141504, -3028544, -3028544, 0, 10340096, 35303296, 85229696, 170459392, 290992384, 411525376, 411525376, 0, -1405035520
Offset: 1
References
- A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- John B. Dobson, A matrix variation on Ramus's identity for lacunary sums of binomial coefficients, arXiv preprint arXiv:1610.09361 [math.NT], 2016.
- Vladimir Shevelev, Combinatorial identities generated by difference analogs of hyperbolic and trigonometric functions of order n, arXiv:1706.01454 [math.CO], 2017.
- Vladimir Shevelev, Coefficient of x^k in ((x+1)^n modulo x^N+1), seqfan, Thu Jul 20 2017.
- Gregory Tollisen and Tamás Lengyel, A congruential identity and the 2-adic order of lacunary sums of binomial coefficients, Integers 4 (2004), #A4.
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-2).
Programs
-
Maple
seq(eval(rem((1+x)^n, 1+x^4,x),x=0),n=1..40); # Robert Israel, Jul 03 2017
-
Mathematica
RecurrenceTable[{a[n] == 4 * a[n - 1] - 6 * a[n - 2] + 4 * a[n - 3] - 2 * a[n - 4], a[1] = 1, a[2] = 1, a[3] = 1, a[4] = 0}, a, {n, 50}] (* G. C. Greubel, Nov 10 2015 *) a[n_] := HypergeometricPFQ[{(1-n)/4, (2-n)/4, (3-n)/4, -n/4}, {1/4, 1/2, 3/4}, -1]; Array[a, 40] (* Jean-François Alcover, Jul 20 2017, from Vladimir Shevelev's first formula *)
-
PARI
a(n) = polcoeff(((1+x)^n)%(x^4+1),0)
-
PARI
Vec(-x*(2*x-1)*(x^2-x+1)/(2*x^4-4*x^3+6*x^2-4*x+1) + O(x^100)) \\ Colin Barker, Nov 08 2015
-
PARI
a(n) = real(([1,1; I,1])^n)[1,1]; \\ Michel Marcus, Nov 08 2015
Formula
From Colin Barker, Nov 08 2015: (Start)
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-2*a(n-4) for n>4.
G.f.: -x*(2*x-1)*(x^2-x+1) / (2*x^4-4*x^3+6*x^2-4*x+1).
(End)
a(n) = (1/2)*((2+sqrt(2))^(n/2)*cos(n*Pi/8) + (2-sqrt(2))^(n/2)*cos(3*n*Pi/8)). - G. C. Greubel, Nov 10 2015
From Vladimir Shevelev, Jun 29 2017: (Start)
a(n) = Sum_{k >= 0}(-1)^k*binomial(n,4*k).
a(n) = round((2+sqrt(2))^(n/2)*cos(Pi*(n)/8)/2), where round(x) is the integer nearest to x.
a(n+m) = a(n)*a(m) - K_4(n)*K_2(m) - K_3(n)*K_3(m) - K_2(n)*K_4(m), where K_2 is A099587, K_3 is A099588 and K_4 is A099589.
(End)
Comments