OFFSET
0,3
COMMENTS
Number of walks of length 4 between any two distinct vertices of the complete graph K_{n+1} (n >= 1). Example: a(2) = 5 because in the complete graph ABC we have the following walks of length 4 between A and B: ABACB, ABCAB, ACACB, ACBAB and ACBCB. - Emeric Deutsch, Apr 01 2004
1/a(n) for n >= 2, is in base n given by 0.repeat(0,0,1,1), due to (1/n^3 + 1/n^4)*(1/(1-1/n^4)) = 1/((n-1)*(n^2+1)). - Wolfdieter Lang, Jun 20 2014
For n>3, a(n) is 1220 in base n-1. - Bruno Berselli, Jan 26 2016
For odd n, a(n) * (n+1) / 2 + 1 also represents the first integer in a sum of n^4 consecutive integers that equals n^8. - Patrick J. McNab, Dec 26 2016
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = round(n^4/(n+1)) for n >= 2.
a(n) = A062160(n, 4), for n > 2.
G.f.: (4*x-1)*(1+x^2)/(1-x)^4 (for the signed sequence). - Emeric Deutsch, Apr 01 2004
a(n) = floor(n^5/(n^2+n)) for n > 0. - Gary Detlefs, May 27 2010
a(n) = -A053698(-n). - Bruno Berselli, Jan 26 2016
Sum_{n>=2} 1/a(n) = A268086. - Amiram Eldar, Nov 18 2020
E.g.f.: exp(x)*(x^3 + 2*x^2 + x - 1). - Stefano Spezia, Apr 22 2023
EXAMPLE
a(4) = 4^3 - 4^2 + 4 - 1 = 64 - 16 + 4 - 1 = 51.
MAPLE
[seq(n^3-n^2+n-1, n=0..49)]; # Zerinvary Lajos, Jun 29 2006
a:=n->sum(1+sum(n, k=1..n), k=2..n):seq(a(n), n=0...43); # Zerinvary Lajos, Aug 24 2008
MATHEMATICA
Table[n^3 - n^2 + n - 1, {n, 0, 49}] (* Alonso del Arte, Apr 30 2014 *)
PROG
(PARI) { for (n=0, 1000, write("b062158.txt", n, " ", n*(n*(n - 1) + 1) - 1) ) } \\ Harry J. Smith, Aug 02 2009
(Magma) [n^3 - n^2 + n - 1 : n in [0..50]]; // Wesley Ivan Hurt, Dec 26 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Henry Bottomley, Jun 08 2001
EXTENSIONS
More terms from Emeric Deutsch, Apr 01 2004
STATUS
approved