login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = Sum_{k=1..7} n^k.
2

%I #22 Dec 06 2018 17:25:04

%S 0,7,254,3279,21844,97655,335922,960799,2396744,5380839,11111110,

%T 21435887,39089244,67977559,113522234,183063615,286331152,435984839,

%U 648232974,943531279,1347368420,1891142967,2613136834,3559590239,4785883224,6357828775,8353082582

%N a(n) = Sum_{k=1..7} n^k.

%H Alois P. Heinz, <a href="/A228291/b228291.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (8, -28, 56, -70, 56, -28, 8, -1).

%F G.f.: x*(x^6+78*x^5+981*x^4+2332*x^3+1443*x^2+198*x+7)/(x-1)^8.

%F a(1) = 7, else a(n) = (n^8-n)/(n-1).

%F a(n) = 8*a(n-1) - 28*a(n-2) + 56*a(n-3) - 70*a(n-4) + 56*a(n-5) - 28*a(n-6) + 8*a(n-7) - a(n-8) with n > 7, a(0)=0, a(1)=7, a(2)=254, a(3)=3279, a(4)=21844, a(5)=97655, a(6)=335922, a(7)=960799. - _Yosu Yurramendi_, Sep 03 2013

%p a:= n-> `if`(n=1, 7, (n^8-n)/(n-1)):

%p seq(a(n), n=0..30);

%t Table[Total[n^Range[7]],{n,0,30}] (* or *) LinearRecurrence[{8,-28,56,-70,56,-28,8,-1},{0,7,254,3279,21844,97655,335922,960799},30] (* _Harvey P. Dale_, Dec 06 2018 *)

%o (R)

%o a <- c(0, 7, 254, 3279, 21844, 97655, 335922, 960799)

%o for(n in (length(a)+1):30) a[n] <- 8*a[n-1] -28*a[n-2] +56*a[n-3] -70*a[n-4] +56*a[n-5] -28*a[n-6] +8*a[n-7] -a[n-8]

%o a [_Yosu Yurramendi_, Sep 03 2013]

%Y Column k=7 of A228275.

%K nonn,easy

%O 0,2

%A _Alois P. Heinz_, Aug 19 2013