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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068476 a(n) = Sum_{m=1..n} m*n^(m+(-1)^n). 1
0, 1, 20, 34, 5008, 3711, 1948356, 937924, 1205220416, 429794605, 1098765432100, 310989720966, 1390027428561168, 326011399456939, 2332600912091693348, 466937872906120456, 5016202619581534249216, 875711370981239308953 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Robert Israel, Table of n, a(n) for n = 0..385

FORMULA

If n >= 2, a(n) = n^(1+(-1)^n)*(n^n*(n^2-n-1)+1)/(n-1)^2. - Robert Israel, Nov 15 2017

EXAMPLE

a(2) = 2^(1+1)+2*2^(2+1) = 4+16 = 20.

MAPLE

b := n->sum(m*n^(m+(-1)^n), m=1..n);

# Alternative:

f:= n -> n^(1+(-1)^n)*(n^n*(n^2-n-1)+1)/(n-1)^2:

f(0):= 0: f(1):= 1:

map(f, [$0..40]);

MATHEMATICA

Table[Sum[m*n^(m+(-1)^n), {m, 1, n}], {n, 0, 30}] (* G. C. Greubel, Oct 13 2018 *)

PROG

(PARI) a(n) = sum(m=1, n, m*n^(m+(-1)^n)); \\ Michel Marcus, Nov 15 2017

(MAGMA) [0] cat [(&+[m*n^(m+(-1)^n): m in [1..n]]): n in [1..30]]; // G. C. Greubel, Oct 13 2018

CROSSREFS

Cf. A062806 (without the (-1)^n).

Sequence in context: A043946 A160937 A060124 * A003895 A157426 A325603

Adjacent sequences:  A068473 A068474 A068475 * A068477 A068478 A068479

KEYWORD

nonn

AUTHOR

Francois Jooste (phukraut(AT)hotmail.com), Mar 10 2002

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 December 6 18:16 EST 2021. Contains 349567 sequences. (Running on oeis4.)