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 A014112 #58 Apr 11 2023 08:42:13 %S A014112 1,2,7,14,27,44,69,100,141,190,251,322,407,504,617,744,889,1050,1231, %T A014112 1430,1651,1892,2157,2444,2757,3094,3459,3850,4271,4720,5201,5712, %U A014112 6257,6834,7447,8094,8779,9500,10261,11060,11901,12782,13707,14674,15687 %N A014112 a(n) = n*(n-1) + (n-2)*(n-3) + ... + 1*0 + 1 for n odd; otherwise, a(n) = n*(n-1) + (n-2)*(n-3) + ... + 2*1. %H A014112 Delbert L. Johnson, <a href="/A014112/b014112.txt">Table of n, a(n) for n = 1..20000</a> %H A014112 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,-2,3,-1). %F A014112 a(n) = a(n-2) + n*(n-1) for n > 2, a(1)=1, a(2)=2. %F A014112 G.f.: x*(1 - x^3 + 3*x^2 - x)/((x + 1)*(x - 1)^4). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 10 2009 %F A014112 a(n) + a(n+1) = A064999(n). - _R. J. Mathar_, Feb 27 2016 %F A014112 a(n) = n*(n + 2)*(2*n - 1)/12 + 3*(1 - (-1)^n)/8. - _Bruno Berselli_, Mar 12 2018 %e A014112 From _Bruno Berselli_, Mar 12 2018: (Start) %e A014112 n=1: 1; %e A014112 n=2: 1*2; %e A014112 n=3: 1 + 0*1 + 2*3 = 7; %e A014112 n=4: 1*2 + 3*4 = 14; %e A014112 n=5: 1 + 0*1 + 2*3 + 4*5 = 27; %e A014112 n=6: 1*2 + 3*4 + 5*6 = 44; %e A014112 n=7: 1 + 0*1 + 2*3 + 4*5 + 6*7 = 69, etc. %e A014112 (End) %t A014112 LinearRecurrence[{3, -2, -2, 3, -1}, {1, 2, 7, 14, 27}, 50] (* _Vincenzo Librandi_, Feb 28 2016 *) %o A014112 (Magma) [n le 2 select n else Self(n-2)+n*(n-1):n in [1..50]]; // _Vincenzo Librandi_, Feb 28 2016 %o A014112 (C#) public BigInteger a(BigInteger n) => (n * (n + 2) * (2 * n - 1) + 9) / 12; // _Delbert L. Johnson_, Mar 19 2023 %Y A014112 Cf. A064999, A178218 (first differences). %K A014112 nonn,easy %O A014112 1,2 %A A014112 _Jon Wild_, Jul 14 1997 %E A014112 More terms from _Erich Friedman_