OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..300
FORMULA
a(n) = ((n - sqrt(4))^n + (n + sqrt(4))^n)/2 = ((n+2)^n + (n-2)^n)/2.
MAPLE
seq( ((n-2)^n + (n+2)^n)/2, n=0..20); # G. C. Greubel, Jan 11 2020
MATHEMATICA
Table[((n+2)^n + (n-2)^n)/2, {n, 0, 20}] (* G. C. Greubel, Jan 11 2020 *)
PROG
(PARI) vector(21, n, ((n-3)^(n-1) + (n+1)^(n-1))/2 ) \\ G. C. Greubel, Jan 11 2020
(Magma) [((n-2)^n + (n+2)^n)/2: n in [0..20]]; // G. C. Greubel, Jan 11 2020
(Sage) [((n-2)^n + (n+2)^n)/2 for n in (0..20)] # G. C. Greubel, Jan 11 2020
(GAP) List([0..20], n-> ((n-2)^n + (n+2)^n)/2); # G. C. Greubel, Jan 11 2020
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, May 11 2003
STATUS
approved