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.
%I A068476 #16 Sep 08 2022 08:45:05 %S A068476 0,1,20,34,5008,3711,1948356,937924,1205220416,429794605, %T A068476 1098765432100,310989720966,1390027428561168,326011399456939, %U A068476 2332600912091693348,466937872906120456,5016202619581534249216,875711370981239308953 %N A068476 a(n) = Sum_{m=1..n} m*n^(m+(-1)^n). %H A068476 Robert Israel, <a href="/A068476/b068476.txt">Table of n, a(n) for n = 0..385</a> %F A068476 If n >= 2, a(n) = n^(1+(-1)^n)*(n^n*(n^2-n-1)+1)/(n-1)^2. - _Robert Israel_, Nov 15 2017 %e A068476 a(2) = 2^(1+1)+2*2^(2+1) = 4+16 = 20. %p A068476 b := n->sum(m*n^(m+(-1)^n),m=1..n); %p A068476 # Alternative: %p A068476 f:= n -> n^(1+(-1)^n)*(n^n*(n^2-n-1)+1)/(n-1)^2: %p A068476 f(0):= 0: f(1):= 1: %p A068476 map(f, [$0..40]); %t A068476 Table[Sum[m*n^(m+(-1)^n), {m,1,n}], {n,0,30}] (* _G. C. Greubel_, Oct 13 2018 *) %o A068476 (PARI) a(n) = sum(m=1, n, m*n^(m+(-1)^n)); \\ _Michel Marcus_, Nov 15 2017 %o A068476 (Magma) [0] cat [(&+[m*n^(m+(-1)^n): m in [1..n]]): n in [1..30]]; // _G. C. Greubel_, Oct 13 2018 %Y A068476 Cf. A062806 (without the (-1)^n). %K A068476 nonn %O A068476 0,3 %A A068476 Francois Jooste (phukraut(AT)hotmail.com), Mar 10 2002