OFFSET
0,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..990
FORMULA
a(n+1) = (((n-2)*a(n))/(n-1)) + ((12*(n)^2-12*(n)+1)/(n-1)) for n>=1.
Conjectures from Colin Barker, Jan 01 2017: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>4.
G.f.: (1 + 9*x - 8*x^2 + 9*x^3 - 3*x^4) / (1 - x)^3.
(End)
From Sela Fried, Feb 01 2026: (Start)
Barker's conjectures are true. The recursion and g.f. follow from the formula for a(n). To see why the formula is true, write the condition as (a*d-b*c)=n*(a*d+b*c) and assume that n>=2. Rearranging, (1-n)*a*d=(1+n)*b*c. Since 1-n<0 and 1+n>0, necessarily a*d=b*c=0. Thus, at least one of a,d and, independently, at least one of b,c must be 0. This gives 2*n+1 possibilities for each of the two pairs, proving that a(n)=(2*n+1)^2. The cases n=0,1 are verified directly. (End)
PROG
(Python)
def t(n):
s=0
for a in range(n+1):
for b in range(n+1):
for c in range(n+1):
for d in range(n+1):
if (a*d-b*c)==n*(a*d+b*c):
s+=1
return s
for i in range(41):
print(str(i)+" "+str(t(i)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Indranil Ghosh, Jan 01 2017
STATUS
approved
