login
a(n) = n^(n+1) - (n+1)^n.
19

%I #55 Jul 04 2022 19:48:42

%S -1,-1,-1,17,399,7849,162287,3667649,91171007,2486784401,74062575399,

%T 2395420006033,83695120256591,3143661612445145,126375169532421599,

%U 5415486851106043649,246486713303685957375,11877172892329028459041,604107995057426434824791

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

%C From _Mathew Englander_, Jul 07 2020: (Start)

%C All a(n) are odd and for n even, a(n) == 3 (mod 4); for n odd and n != 1, a(n) == 1 (mod 4).

%C The correspondence between n and a(n) when considered mod 6 is as follows: for n == 0, 1, 2, or 3, a(n) == 5; for n == 4, a(n) == 3; for n == 5, a(n) == 1.

%C For all n, a(n)+1 is a multiple of n^2.

%C For n odd and n >= 3, a(n)-1 is a multiple of (n+1)^2.

%C For n even and n >= 0, a(n)+1 is a multiple of (n+1)^2.

%C For proofs of the above, see the Englander link. (End)

%D G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.

%H T. D. Noe, <a href="/A007925/b007925.txt">Table of n, a(n) for n = 0..100</a>

%H Mathew Englander, <a href="/A007925/a007925.pdf">Notes on OEIS A007925</a>

%H Sergio Silva, <a href="http://ginasiomental.no.sapo.pt/materialc/mteste/teste.htm">Teste Numerico</a>, Item 3.

%H H. J. Smith, <a href="http://harry-j-smith-memorial.com/Display/xyyx.html">Contour Plot of z = x^y - y^x</a>

%F Asymptotic expression for a(n) is a(n) ~ n^n * (n - e). - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 19 2001

%F From _Mathew Englander_, Jul 07 2020: (Start)

%F a(n) = A111454(n+4) - 1.

%F a(n) = A055651(n, n+1).

%F a(n) = A220417(n+1, n) for n >= 1.

%F a(n) = A007778(n) - A000169(n+1).

%F (End)

%F E.g.f.: LambertW(-x)/((1+LambertW(-x))*x)-LambertW(-x)/(1+LambertW(-x))^3. - _Alois P. Heinz_, Jul 04 2022

%e a(2) = 1^2 - 2^1 = -1,

%e a(4) = 3^4 - 4^3 = 17.

%p A007925:=n->n^(n+1)-(n+1)^n: seq(A007925(n), n=0..25); # _Wesley Ivan Hurt_, Jan 10 2017

%t lst={};Do[AppendTo[lst, (n^(n+1)-((n+1)^n))], {n, 0, 4!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Sep 19 2008 *)

%t #^(#+1)-(#+1)^#&/@Range[0,20] (* _Harvey P. Dale_, Oct 22 2011 *)

%o (Maxima) A007925[n]:=n^(n+1)-(n+1)^n$ makelist(A007925[n],n,0,30); /* _Martin Ettl_, Oct 29 2012 */

%o (PARI) a(n)=n^(n+1)-(n+1)^n \\ _Charles R Greathouse IV_, Feb 06 2017

%Y Cf. A051442.

%Y Cf. A166326, A099498, A141074, A174379, A123206, A045575, A082754.

%K sign,easy,nice

%O 0,4

%A Dennis S. Kluk (mathemagician(AT)ameritech.net)