OFFSET
0,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = 16*(n+1)^3 - 28*(n+1)^2 + 16*(n+1) - 3 for n>0.
From G. C. Greubel, Dec 25 2016: (Start)
G.f.: (1 + 41*x + 51*x^2 + 3*x^3)/(1 - x)^4.
E.g.f.: (1 + 44*x + 68*x^2 + 16*x^3)*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)
MATHEMATICA
Table[16*(n+1)^3 - 28*(n+1)^2 + 16*(n+1) - 3, {n, 0, 50}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 45, 225, 637}, 50] (* G. C. Greubel, Dec 25 2016 *)
PROG
def t(n):
s=0
for a in range(-n, n+1):
for b in range(-n, n+1):
for c in range(-n, n+1):
for d in range(-n, n+1):
if (a*d-b*c)==(a*d+b*c):
s+=1
return s
for i in range(0, 1001):
print str(i)+" "+str(t(i))
(PARI) for(n=0, 50, print1(16*(n+1)^3 - 28*(n+1)^2 + 16*(n+1) - 3, ", ")) \\ G. C. Greubel, Dec 25 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Indranil Ghosh, Dec 25 2016
STATUS
approved