OFFSET
0,4
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (1,4,-4,-6,6,4,-4,-1,1).
FORMULA
From Colin Barker, Dec 13 2016: (Start)
a(n) = (3*n^4 - 8*n^3 - 12*n^2 + 32*n)/8 for n even.
a(n) = (3*n^4 - 4*n^3 - 10*n^2 + 4*n + 7)/8 for n odd.
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9) for n>8.
G.f.: 8*x^3*(1 + 2*x + 11*x^2 + 4*x^3) / ((1 - x)^5*(1 + x)^4).
(End)
MATHEMATICA
CoefficientList[Series[8 x^3*(1 + 2 x + 11 x^2 + 4 x^3)/((1 - x)^5*(1 + x)^4), {x, 0, 43}], x] (* Michael De Vlieger, Dec 13 2016 *)
PROG
(Python)
def t(n):
s=0
for a in range(0, n+1):
for b in range(0, n+1):
for c in range(0, n+1):
for d in range(0, n+1):
if (a!=b and a!=d and b!=d and c!=a and c!=b and c!=d):
if (a*d-b*c)%2==1:
s+=1
return s
for i in range(0, 201):
print str(i)+" "+str(t(i))
(PARI) F(n, {r=0})={my(s=vector(2), v); forvec(y=vector(4, j, [0, n]), for(k=23*!!r, 23, v=numtoperm(4, k); s[1+(y[v[1]]*y[v[4]]-y[v[3]]*y[v[2]])%2]++), 2*!r); return(s)} \\ a(n)=F(n, 0)[2];
(PARI) concat(vector(3), Vec(8*x^3*(1 + 2*x + 11*x^2 + 4*x^3) / ((1 - x)^5*(1 + x)^4) + O(x^40))) \\ Colin Barker, Dec 13 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Indranil Ghosh, Dec 13 2016
STATUS
approved