OFFSET
0,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..995
FORMULA
a(n-1) = (((-2*(n-1)-1)*a(n-1))/(2*(n-1)-1)) + 8*(n-1)^2 + 10*(n-1) + 3 for n>=2, with a(0)=0.
Conjectures from Colin Barker, Jan 01 2017: (Start)
a(n) = 4*n^2 + 8*n + 3 for n>0 and even.
a(n) = 4*n^2 + 6*n + 2 for n odd.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5.
G.f.: x*(12 + 23*x - 3*x^2 - 3*x^3 + 3*x^4) / ((1 - x)^3*(1 + x)^2).
(End)
EXAMPLE
For n=2, the matrices are [0,0,0,0], [0,0,0,1], [0,0,0,2], [0,0,1,0], [0,0,1,1], [0,0,1,2], [0,0,2,0], [0,0,2,1], [0,0,2,2], [0,1,0,0], [0,1,0,1], [0,1,0,2], [0,1,1,0], [0,1,1,1], [0,1,1,2], [0,2,0,0], [0,2,0,1], [0,2,0,2], [1,0,0,0], [1,0,0,1], [1,0,1,0], [1,0,1,1], [1,0,2,0], [1,0,2,1], [1,1,0,0], [1,1,0,1], [1,1,1,0], [1,2,0,0], [1,2,0,1], [2,0,0,0], [2,0,1,0], [2,0,2,0], [2,1,0,0], [2,1,1,0], [2,2,0,0].
Here each of these matrices M is defined as M=[a,b,c,d], where a=M[1][1], b=M[1][2], c=M[2][1], d=M[2][2]. There are 35 possibilities. So for n=2, a(n)=35.
MATHEMATICA
CoefficientList[Series[x (12 + 23 x - 3 x^2 - 3 x^3 + 3 x^4)/((1 - x)^3*(1 + x)^2), {x, 0, 50}], x] (* Michael De Vlieger, Jan 01 2017 *)
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*d-b*c)**n==(a*d+b*c):
s+=1
return s
for i in range(0, 51):
print str(i)+" "+str(t(i))
(Python)
def a(n):
if n==2:
return 12
return (((-2*(n-1)-1)*a(n-1))/(2*(n-1)-1))+8*(n-1)**2+10*(n-1)+3
for i in range(2, 1001):
print str(i)+" "+str(a(i))
CROSSREFS
KEYWORD
nonn
AUTHOR
Indranil Ghosh, Jan 01 2017
STATUS
approved