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.

A140162 a(1)=1, a(n) = a(n-1) + n^5 if n odd, a(n) = a(n-1) + n^0 if n is even.

This page as a plain text file.
%I A140162 #20 Jan 02 2024 09:02:31
%S A140162 1,2,245,246,3371,3372,20179,20180,79229,79230,240281,240282,611575,
%T A140162 611576,1370951,1370952,2790809,2790810,5266909,5266910,9351011,
%U A140162 9351012,15787355,15787356,25552981,25552982,39901889,39901890,60413039
%N A140162 a(1)=1, a(n) = a(n-1) + n^5 if n odd, a(n) = a(n-1) + n^0 if n is even.
%H A140162 G. C. Greubel, <a href="/A140162/b140162.txt">Table of n, a(n) for n = 1..1000</a>
%H A140162 <a href="/index/Rec#order_13">Index entries for linear recurrences with constant coefficients</a>, signature (1, 6, -6, -15, 15, 20, -20, -15, 15, 6, -6, -1, 1).
%F A140162 G.f.: x*(-1 - x - 237*x^2 + 5*x^3 - 1682*x^4 - 10*x^5 - 1682*x^6 + 10*x^7 - 237*x^8 - 5*x^9 - x^10 + x^11)/((1+x)^6*(x-1)^7). - _R. J. Mathar_, Feb 22 2009
%t A140162 a = {}; r = 5; s = 0; Do[k = 0; Do[k = k + (Sin[Pi m/2]^2) m^r + (Cos[Pi m/2]^2) m^s, {m, 1, n}]; AppendTo[a, k], {n, 1, 100}]; a (* _Artur Jasinski_ *)
%t A140162 LinearRecurrence[{1,6,-6,-15,15,20,-20,-15,15,6,-6,-1,1},{1,2,245,246, 3371,3372,20179,20180,79229,79230,240281,240282,611575},40]  (* _Harvey P. Dale_, Apr 21 2011 *)
%o A140162 (PARI) for(n=1,50, print1((1/24)*(3*(-1 +(-1)^n) + 12*n + (-1 +15*(-1)^n)*n^2 + 5*(1 -3* (-1)^n)*n^4 - 6*(-1 +(-1)^n)*n^5 + 2*n^6), ", ")) \\ _G. C. Greubel_, Jul 05 2018
%o A140162 (Magma) [(1/24)*(3*(-1 +(-1)^n) + 12*n + (-1 +15*(-1)^n)*n^2 + 5*(1 -3* (-1)^n)*n^4 - 6*(-1 +(-1)^n)*n^5 + 2*n^6): n in [1..50]]; // _G. C. Greubel_, Jul 05 2018
%Y A140162 Cf. A000027, A000217, A000330, A000537, A000538, A000539, A136047, A140113.
%K A140162 nonn
%O A140162 1,2
%A A140162 _Artur Jasinski_, May 12 2008