login
a(n) = n^n - n + 1.
(Formerly M3111)
5

%I M3111 #45 May 02 2023 16:21:08

%S 1,3,25,253,3121,46651,823537,16777209,387420481,9999999991,

%T 285311670601,8916100448245,302875106592241,11112006825558003,

%U 437893890380859361,18446744073709551601,827240261886336764161,39346408075296537575407,1978419655660313589123961

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

%C Related to famous "coconuts" problem - cf. A002021, A002022.

%C Also main diagonal of A193871. - _Omar E. Pol_, Aug 22 2011

%D Archimedeans Problems Drive, Eureka, 41 (1981), 7.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Vincenzo Librandi, <a href="/A006091/b006091.txt">Table of n, a(n) for n = 1..200</a>

%H Archimedeans Problems Drive, <a href="/A006091/a006091.pdf">Problems for 1980</a>, Eureka, 41 (1981), 6-7. (Annotated scanned copy)

%H J. Burkardt, <a href="http://web.archive.org/web/20120626221916/http://orion.math.iastate.edu/burkardt/puzzles/coconut_puzzle.html">The Coconut puzzle (version 3)</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 Mark Richardson, <a href="https://doi.org/10.15200/winn.147175.52128">A Needlessly Complicated and Unhelpful Solution to Ben Ames Williams' Famous Coconuts Problem</a>, The Winnower, Authorea (2016) Vol. 3.

%F E.g.f.: 1/(1 + LambertW(-x)) + exp(x)*(1 - x) - 2. - _Ilya Gutkovskiy_, Oct 30 2017

%t Table[n^n-n+1,{n,20}] (* _Harvey P. Dale_, Jun 09 2011 *)

%o (Magma) [n^n - n + 1: n in [1..20]]; // _Vincenzo Librandi_, Aug 23 2011

%o (PARI) A006091(n)=n^n-n+1 \\ _M. F. Hasler_, Oct 30 2017

%Y Cf. A014293.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_