login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A176824 a(n) = (n+1)^n mod n^n. 5
0, 1, 10, 113, 1526, 24337, 450066, 9492289, 225159022, 5937424601, 172385029466, 5465884225969, 187964560069638, 6968912374274593, 277133723845128226, 11767703728247765249, 531431035966023003614, 25434534147318166381993, 1286040688679372821752042 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..19.

FORMULA

From Peter Bala, Sep 12 2012: (Start)

a(n) = (n+1)^n - 2*n^n (since 2*n^n <= (n+1)^n < 3*n^n for n >= 1).

In terms of the tree function T(x) = Sum_{n >= 1} n^(n-1)*x^n/n! of A000169 the e.g.f. is T(x)*(2*x + T(x)*(T(x)-2))/(x^2*(T(x)-1)^3) = x + 10*x^2/2! + 113*x^3/3! + ... . (End)

a(n) = Sum_{i=1..n-1} C(n,i-1)*i^(i-1)*(n-i)^(n-i). - Vladimir Kruchinin, Sep 07 2015

a(n) = A000169(n+1) - 2*A000312(n). - Michel Marcus, Sep 07 2015, after Peter Bala

MAPLE

A176824:=n->(n+1)^n mod n^n: seq(A176824(n), n=1..25); # Wesley Ivan Hurt, Sep 10 2015

MATHEMATICA

Table[Mod[(n+1)^n, n^n], {n, 30}]

PROG

(MAGMA) [(n+1)^n mod n^n: n in [1..20]]; // Vincenzo Librandi, Sep 07 2015

(PARI) first(m)=vector(m, i, ((i+1)^i) % (i^i)) \\ Anders Hellström, Sep 07 2015

CROSSREFS

Cf. A000169, A000312, A048160.

Sequence in context: A263370 A129866 A024130 * A196983 A199908 A185391

Adjacent sequences:  A176821 A176822 A176823 * A176825 A176826 A176827

KEYWORD

nonn,easy

AUTHOR

Vladimir Joseph Stephan Orlovsky, Apr 26 2010

EXTENSIONS

a(19) from Vincenzo Librandi, Sep 07 2015

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 September 21 23:55 EDT 2019. Contains 327286 sequences. (Running on oeis4.)