OFFSET
0,5
COMMENTS
Example of a recursive sequence which produces a table containing three ones.
LINKS
Arkadiusz Wesolowski, Table of n, a(n) for n = 0..14
Eric Weisstein's World of Mathematics, Recursive Sequence
FORMULA
a(0) = 0, a(n) = a(n-1)^2 - n^(n-2) + n.
EXAMPLE
a(4) = -11 because a(3) = 1 and 1^2 - 4^(4-2) + 4 = -11.
MATHEMATICA
RecurrenceTable[{a[n] == a[n - 1]^2 - n^(n - 2) + n, a[0] == 0}, a, {n, 10}]
PROG
(PARI) print1(a=0, ", "); for(n=1, 10, print1(a=a^2-n^(n-2)+n, ", "));
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Arkadiusz Wesolowski, Aug 09 2011
STATUS
approved