login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007781 a(n) = (n+1)^(n+1) - n^n for n>0, a(0) = 1. 11
1, 3, 23, 229, 2869, 43531, 776887, 15953673, 370643273, 9612579511, 275311670611, 8630788777645, 293959006143997, 10809131718965763, 426781883555301359, 18008850183328692241, 808793517812627212561 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

(12n^2 + 6n + 1)^2 divides a(6n+1), where (12n^2 + 6n + 1) = (2n+1)^3 - (2n)^3{19,61,127,217,331,469,631,817,1027,1261,...} = 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

REFERENCES

R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see equation (6.7).

LINKS

Doug Bell, Table of n, a(n) for n = 0..100

R. K. Hoeflin, Mega Test [Broken link, but leave link in place for historical reasons]

Eric Weisstein's World of Mathematics, Power Difference Prime

FORMULA

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

a(n) = abs(discriminant(x^(n+1)-x+1)).

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

EXAMPLE

a(14) = 10809131718965763 = 3 * 61^2 * 968299894201.

MAPLE

seq( `if`(n=0, 1, (n+1)^(n+1) -n^n), n=0..20); # G. C. Greubel, Mar 05 2020

MATHEMATICA

Join[{1}, Table[(n+1)^(n+1)-n^n, {n, 20}]]  (* Harvey P. Dale, Feb. 09 2011 *)

Differences[Table[n^n, {n, 0, 20}]] (* Charles R Greathouse IV, Feb 09 2011 *)

PROG

(PARI) first(m)=vector(m, i, i--; (i+1)^(i+1) - i^i) /* Anders Hellström, Aug 18 2015 */

(MAGMA) [1] cat [(n+1)^(n+1)-n^n: n in [1..20]]; // Vincenzo Librandi, Aug 19 2015

(Sage) [1]+[(n+1)^(n+1) -n^n for n in (1..20)] # G. C. Greubel, Mar 05 2020

CROSSREFS

Cf. A002407, A003215, A068146, A068954, A068955, A068956, A068957.

Cf. A127854 = Largest number k such that k^2 divides A007781(6n+1).

Sequence in context: A068954 A068955 A151393 * A068146 A162591 A278745

Adjacent sequences:  A007778 A007779 A007780 * A007782 A007783 A007784

KEYWORD

nonn,easy

AUTHOR

Peter McCormack (peter.mccormack(AT)its.csiro.au)

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 15 15:24 EDT 2020. Contains 336504 sequences. (Running on oeis4.)