OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..380
FORMULA
a(n) = ( (n + sqrt(n))^n + (n - sqrt(n))^n )/2.
MAPLE
seq( `if`(n=0, 1, round(( (n + sqrt(n))^n + (n - sqrt(n))^n )/2)), n=0..20); # G. C. Greubel, Jan 03 2020
MATHEMATICA
Table[If[n==0, 1, Round[((n+Sqrt[n])^n + (n-Sqrt[n])^n)/2]], {n, 0, 20}] (* G. C. Greubel, Jan 03 2020 *)
PROG
(PARI) vector(21, n, if(n==0, 1, round( ( (n-1 + sqrt(n-1))^(n-1) + (n-1 - sqrt(n-1))^(n-1) )/2 )) ) \\ G. C. Greubel, Jan 03 2020
(Magma) [1] cat [Round(( (n +Sqrt(n))^n + (n -Sqrt(n))^n )/2): n in [1..20]]; // G. C. Greubel, Jan 03 2020
(Sage) [1]+[round(( (n +sqrt(n))^n + (n -sqrt(n))^n )/2) for n in (1..30)] # G. C. Greubel, Jan 03 2020
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, May 11 2003
STATUS
approved