cp's OEIS Frontend

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.

A158498 a(n) = (1/2)*(n^3 - 6*n^2 + 13*n - 6).

This page as a plain text file.
%I A158498 #23 Mar 18 2025 03:08:41
%S A158498 1,2,3,7,17,36,67,113,177,262,371,507,673,872,1107,1381,1697,2058,
%T A158498 2467,2927,3441,4012,4643,5337,6097,6926,7827,8803,9857,10992,12211,
%U A158498 13517,14913,16402,17987,19671,21457,23348,25347,27457,29681
%N A158498 a(n) = (1/2)*(n^3 - 6*n^2 + 13*n - 6).
%H A158498 G. C. Greubel, <a href="/A158498/b158498.txt">Table of n, a(n) for n = 1..1000</a>
%H A158498 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F A158498 a(n) = (1/2)*(n^3 - 6*n^2 + 13*n - 6).
%F A158498 G.f.: x*(1 - 2*x + x^2 + 3*x^3) / (1-x)^4.
%F A158498 a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - _G. C. Greubel_, Feb 19 2017
%F A158498 From _G. C. Greubel_, Mar 18 2025: (Start)
%F A158498 a(n) = (1/2)*(A000578(n-2) + A000027(n+2)).
%F A158498 E.g.f.: 3 - (1/2)*(6 - 8*x + 3*x^2 - x^3)*exp(x). (End)
%t A158498 Table[((n-2)^3+n+2)/2, {n,50}] (* or *) LinearRecurrence[{4,-6,4,-1}, {1,2,3,7}, 50] (* _G. C. Greubel_, Feb 19 2017; Mar 18 2025 *)
%o A158498 (PARI) my(x='x+O('x^50)); Vec(x*(1 - 2*x + x^2 + 3*x^3) / (1-x)^4) \\ _G. C. Greubel_, Feb 19 2017
%o A158498 (PARI) a(n)=(n^3 - 6*n^2 + 13*n - 6)/2 \\ _Charles R Greathouse IV_, Feb 19 2017
%o A158498 (Magma)
%o A158498 A158498:= func< n | ((n-2)^3+n+2)/2 >;
%o A158498 [A158498(n): n in [1..50]]; // _G. C. Greubel_, Mar 18 2025
%o A158498 (SageMath)
%o A158498 def A158498(n): return ((n-2)^3 +n+2)//2
%o A158498 print([A158498(n) for n in range(1,51)]) # _G. C. Greubel_, Mar 18 2025
%Y A158498 Cf. A000027, A000578.
%K A158498 nonn,easy
%O A158498 1,2
%A A158498 _Alexander R. Povolotsky_, Jan 13 2011