cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A007781 a(n) = (n+1)^(n+1) - n^n for n>0, a(0) = 1.

This page as a plain text file.
%I A007781 #55 Jul 06 2025 22:24:20
%S A007781 1,3,23,229,2869,43531,776887,15953673,370643273,9612579511,
%T A007781 275311670611,8630788777645,293959006143997,10809131718965763,
%U A007781 426781883555301359,18008850183328692241,808793517812627212561
%N A007781 a(n) = (n+1)^(n+1) - n^n for n>0, a(0) = 1.
%C A007781 (12n^2 + 6n + 1)^2 divides a(6n+1), where (12n^2 + 6n + 1) = (2n+1)^3 - (2n)^3 = A127854(n) = A003215(2n) are the hex (or centered hexagonal) numbers. The prime numbers of the form 12n^2 + 6n + 1 belong to A002407. - _Alexander Adamchuk_, Apr 09 2007
%D A007781 Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see equation (6.7).
%H A007781 Doug Bell, <a href="/A007781/b007781.txt">Table of n, a(n) for n = 0..100</a>
%H A007781 Andrew Cusumano, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Problems/advanced45-2.pdf">Problem H-656</a>, Advanced Problems and Solutions, The Fibonacci Quarterly, Vol. 45, No. 2 (2007), p. 187; <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Problems/Aug2009advanced.pdf">A Sequence Tending To e</a>, Solution to Problem H-656, ibid., Vol. 46-47, No. 3 (2008/2009), pp. 285-287.
%H A007781 Ronald K. Hoeflin, <a href="https://web.archive.org/web/20140220060408/http://www.eskimo.com:80/~miyaguch/mega.html">Mega Test</a>. [Wayback Machine link]
%H A007781 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PowerDifferencePrime.html">Power Difference Prime</a>.
%F A007781 a(n) = A000312(n+1) - A000312(n) for n>0, a(0) = 1.
%F A007781 a(n) = abs(discriminant(x^(n+1)-x+1)).
%F A007781 E.g.f.: W(-x)/(1+W(-x)) - W(-x)/((1+W(-x))^3*x) where W is the Lambert W function. - _Robert Israel_, Aug 19 2015
%F A007781 Limit_{n->oo} (a(n+2)/a(n+1) - a(n+1)/a(n)) = e (Cusumano, 2007). - _Amiram Eldar_, Jan 03 2022
%e A007781 a(14) = 10809131718965763 = 3 * 61^2 * 968299894201.
%p A007781 seq( `if`(n=0,1,(n+1)^(n+1) -n^n), n=0..20); # _G. C. Greubel_, Mar 05 2020
%t A007781 Join[{1},Table[(n+1)^(n+1)-n^n,{n,20}]]  (* _Harvey P. Dale_, Feb 09 2011 *)
%t A007781 Differences[Table[n^n,{n,0,20}]] (* _Charles R Greathouse IV_, Feb 09 2011 *)
%o A007781 (PARI) first(m)=vector(m,i,i--;(i+1)^(i+1) - i^i) /* _Anders Hellström_, Aug 18 2015 */
%o A007781 (Magma) [1] cat [(n+1)^(n+1)-n^n: n in [1..20]]; // _Vincenzo Librandi_, Aug 19 2015
%o A007781 (Sage) [1]+[(n+1)^(n+1) -n^n for n in (1..20)] # _G. C. Greubel_, Mar 05 2020
%Y A007781 Cf. A000312, A068146, A068954, A068955, A068956, A068957.
%Y A007781 Cf. A002407, A003215, A127854.
%K A007781 nonn,easy
%O A007781 0,2
%A A007781 Peter McCormack (peter.mccormack(AT)its.csiro.au)