OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: -(10*x^3-20*x^2+15*x-4)/((x-1)*(2*x-1)*(2*x^2-2*x+1)). [Joerg Arndt, Feb 20 2014]
a(n) = 2^n + (1+i)^n + (1-i)^n + 1. [Bruno Berselli, Feb 20 2014]
MAPLE
seq(GInorm(1+(1+I)**n), n=0..33);
MATHEMATICA
Table[Norm[{1 + (1 + I)^n}]^2, {n, 0, 40}] (* Bruno Berselli, Feb 20 2014 *)
CoefficientList[Series[-(10 x^3 - 20 x^2 + 15 x - 4)/((x - 1) (2 x - 1) (2 x^2 - 2 x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 21 2014 *)
PROG
(PARI) a(n) = norml2(1+(1+I)^n); \\ Michel Marcus, Feb 19 2014
(Magma) [Floor(2^n+(1+Sqrt(-1))^n+(1-Sqrt(-1))^n+1): n in [0..40]]; // Vincenzo Librandi, Feb 21 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Cristóbal Camarero, Feb 19 2014
STATUS
approved