login
a(n) = n*n^n - (n-1)(n-1)^n.
1

%I #25 Sep 27 2023 02:45:29

%S 1,1,7,65,781,11529,201811,4085185,93864121,2413042577,68618940391,

%T 2138428376721,72470493235141,2653457921150425,104382202543721467,

%U 4390455017903519489,196621779843659466481,9340717969198079777313

%N a(n) = n*n^n - (n-1)(n-1)^n.

%C The system of equations

%C x(0) = n*x(1) + 1,

%C (n-1)*x(1) = n*x(2) + 1,

%C ...

%C (n-1)*x(n) = n*x(n+1) + 1.

%C relates to the Monkey-And-Coconuts problem and reduces to the single equation

%C A007778(n-1)*x(0) = A007778(n)*x(n+1) + a(n),

%C whose solutions {x(0),x(n+1)} are given by {A014293(n), A085606(n)=A007778(n-1) - 1}. - _Lekraj Beedassy_, Jul 15 2003

%C For n >= 1, a(n) is equal to the number of functions f: {1,2,...,n+1}->{1,2,...,n} such that Im(f) contains a fixed element. - Aleksandar M. Janjic and _Milan Janjic_, Feb 27 2007

%H Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a>

%H BBC, <a href="http://www.bbc.co.uk/dna/onthefuture/A882498">The Monkey and the Coconuts</a>

%H K. Belcourt, <a href="http://paulbourke.net/fun/coconut.html">How Many Coconuts</a>

%H Santo D'Agostino, <a href="https://qedinsight.wordpress.com/2011/05/13/the-coconut-problem/">“The Coconut Problem”; Updated With Solution</a>, May 2011.

%H J. Dean, <a href="http://www.freepuzzles.com/puzzles/PuzzlePage.asp?PuzzleNumber=Logic030&amp;CategoryID=2">Sailors, monkey and coconuts</a>

%H A. K. Dewdney, <a href="http://www.math.uwaterloo.ca/navigation/ideas/Zeno/zenologic.shtml#12">The Monkey and the Coconuts</a>

%H G. Lewandrowski, <a href="http://206.21.170.2/csci180/99f/projects/project1.html">The Monkey Problem</a>

%H R. Raja, <a href="http://www.flooble.com/perplexus/show.php?pid=483">Monkeys and Coconuts</a>

%H A. Rishi, <a href="http://www.tribuneindia.com/2002/20020914/windows/mind.htm">Nemo's sailors and the monkey</a>

%H Dr. Rob, The MathForum, <a href="http://mathforum.org/library/drmath/view/56781.html">Coconut piles</a>

%H D. J. Wright, <a href="http://www.math.okstate.edu/~wrightd/crypt/lecnotes/node24.html">Five Pirates and a Monkey</a>

%F E.g.f.: -(x + 2*x*W(-x) + W(-x)^2)/(W(-x)*(1 + W(-x))^3), where W(x) is the Lambert W function. - _Fabian Pereyra_, Sep 26 2023

%t Join[{1},Table[n*n^n-(n-1)(n-1)^n,{n,20}]] (* _Harvey P. Dale_, Sep 08 2016 *)

%Y Cf. A045531, A055869.

%K easy,nonn

%O 0,3

%A _Paul Barry_, Jun 26 2003