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 A186423 #29 Jan 31 2023 15:11:31 %S A186423 0,1,3,4,8,11,17,20,28,33,43,48,60,67,81,88,104,113,131,140,160,171, %T A186423 193,204,228,241,267,280,308,323,353,368,400,417,451,468,504,523,561, %U A186423 580,620,641,683,704,748,771,817,840,888,913,963,988,1040,1067,1121,1148,1204,1233,1291,1320 %N A186423 Partial sums of A186421. %H A186423 G. C. Greubel, <a href="/A186423/b186423.txt">Table of n, a(n) for n = 0..1000</a> %H A186423 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1,1,-1,-1,1). %F A186423 From _R. J. Mathar_, Feb 28 2011: (Start) %F A186423 G.f.: x*(1 + 2*x + 2*x^3 + x^4)/( (1+x^2)*(1+x)^2*(1-x)^3 ). %F A186423 a(n) = (6*n*(n+1) + 3 + (-1)^n*(2*n+1) - 4*A087960(n))/16. (End) %F A186423 E.g.f.: ((2 + 5*x + 3*x^2)*cosh(x) + (1 + 7*x + 3*x^2)*sinh(x) + 2*sin(x) - 2*cos(x))/8. - _G. C. Greubel_, Oct 09 2019 %p A186423 A087960 := proc(n) op((n mod 4)+1,[1,-1,-1,1]) ; end proc: %p A186423 A186423 := proc(n) 3*n*(n+1)/8 +3/16 +(-1)^n*(2*n+1)/16 -A087960(n)/4 ; end proc: # _R. J. Mathar_, Feb 28 2011 %t A186423 CoefficientList[Series[x(1+2x+2x^3+x^4)/((1-x)^3(1+x)^2(1+x^2)),{x, 0, 65}],x] (* _Harvey P. Dale_, Mar 13 2011 *) %t A186423 Table[(6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^Binomial[n+1, 2])/16, {n, 0, 65}] (* _G. C. Greubel_, Oct 09 2019 *) %o A186423 (Haskell) %o A186423 a186423 n = a186423_list !! n %o A186423 a186423_list = scanl1 (+) a186421_list %o A186423 (PARI) vector(66, n, my(m=n-1); (6*m^2 +6*m +3 +(-1)^m*(2*m+1) -4*(-1)^binomial(m+1, 2))/16) \\ _G. C. Greubel_, Oct 09 2019 %o A186423 (Magma) [(6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^Binomial(n+1, 2))/16: n in [0..65]]; // _G. C. Greubel_, Oct 09 2019 %o A186423 (Sage) [(6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^binomial(n+1, 2))/16 for n in (0..65)] # _G. C. Greubel_, Oct 09 2019 %o A186423 (GAP) List([0..65], n-> (6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^Binomial(n+1, 2))/16); # _G. C. Greubel_, Oct 09 2019 %o A186423 (Python) %o A186423 def A186423(n): return (6*n*(n+1)+3+(-2*n-1 if n&1 else 2*n+1)+(4 if n+1&2 else -4))>>4 # _Chai Wah Wu_, Jan 31 2023 %Y A186423 A062717 is the subsequence of even terms. %Y A186423 A186424 is the subsequence of odd terms. %K A186423 nonn,easy %O A186423 0,3 %A A186423 _Reinhard Zumkeller_, Feb 21 2011 %E A186423 More terms added by _G. C. Greubel_, Oct 09 2019