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 A062158 #70 Dec 31 2024 14:03:35 %S A062158 -1,0,5,20,51,104,185,300,455,656,909,1220,1595,2040,2561,3164,3855, %T A062158 4640,5525,6516,7619,8840,10185,11660,13271,15024,16925,18980,21195, %U A062158 23576,26129,28860,31775,34880,38181,41684,45395,49320,53465,57836,62439,67280,72365,77700,83291,89144,95265,101660 %N A062158 a(n) = n^3 - n^2 + n - 1 = (n-1) * (n^2 + 1). %C A062158 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 %C A062158 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 %C A062158 For n>3, a(n) is 1220 in base n-1. - _Bruno Berselli_, Jan 26 2016 %C A062158 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 %H A062158 Harry J. Smith, <a href="/A062158/b062158.txt">Table of n, a(n) for n = 0..1000</a> %H A062158 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1). %F A062158 a(n) = round(n^4/(n+1)) for n >= 2. %F A062158 a(n) = A062160(n, 4), for n > 2. %F A062158 G.f.: (4*x-1)*(1+x^2)/(1-x)^4 (for the signed sequence). - _Emeric Deutsch_, Apr 01 2004 %F A062158 a(n) = floor(n^5/(n^2+n)) for n > 0. - _Gary Detlefs_, May 27 2010 %F A062158 a(n) = -A053698(-n). - _Bruno Berselli_, Jan 26 2016 %F A062158 Sum_{n>=2} 1/a(n) = A268086. - _Amiram Eldar_, Nov 18 2020 %F A062158 E.g.f.: exp(x)*(x^3 + 2*x^2 + x - 1). - _Stefano Spezia_, Apr 22 2023 %e A062158 a(4) = 4^3 - 4^2 + 4 - 1 = 64 - 16 + 4 - 1 = 51. %p A062158 [seq(n^3-n^2+n-1,n=0..49)]; # _Zerinvary Lajos_, Jun 29 2006 %p A062158 a:=n->sum(1+sum(n, k=1..n), k=2..n):seq(a(n), n=0...43); # _Zerinvary Lajos_, Aug 24 2008 %t A062158 Table[n^3 - n^2 + n - 1, {n, 0, 49}] (* _Alonso del Arte_, Apr 30 2014 *) %o A062158 (PARI) a(n) = { n*(n*(n - 1) + 1) - 1 } \\ _Harry J. Smith_, Aug 02 2009 %o A062158 (Magma) [n^3 - n^2 + n - 1 : n in [0..50]]; // _Wesley Ivan Hurt_, Dec 26 2016 %Y A062158 Cf. A002061, A023443, A053698, A060884, A060888, A062159, A062160, A268086. %K A062158 sign,easy %O A062158 0,3 %A A062158 _Henry Bottomley_, Jun 08 2001 %E A062158 More terms from _Emeric Deutsch_, Apr 01 2004