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.

A140155 a(1)=1, a(n)=a(n-1)+n^3 if n odd, a(n)=a(n-1)+ n^4 if n is even.

This page as a plain text file.
%I A140155 #13 Jan 02 2024 09:01:47
%S A140155 1,17,44,300,425,1721,2064,6160,6889,16889,18220,38956,41153,79569,
%T A140155 82944,148480,153393,258369,265228,425228,434489,668745,680912,
%U A140155 1012688,1028313,1485289,1504972,2119628,2144017,2954017,2983808,4032384
%N A140155 a(1)=1, a(n)=a(n-1)+n^3 if n odd, a(n)=a(n-1)+ n^4 if n is even.
%H A140155 Harvey P. Dale, <a href="/A140155/b140155.txt">Table of n, a(n) for n = 1..1000</a>
%F A140155 G.f.: -x*(x^2+1)*(x^6-16*x^5+21*x^4-160*x^3-21*x^2-16*x-1)/((1+x)^5*(x-1)^6). [From _R. J. Mathar_, Feb 22 2009]
%t A140155 a = {}; r = 3; s = 4; 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 A140155 nxt[{n_,a_}]:={n+1,If[EvenQ[n],a+(n+1)^3,a+(n+1)^4]}; NestList[nxt,{1,1},40][[;;,2]] (* _Harvey P. Dale_, Oct 22 2023 *)
%Y A140155 Cf. A000027, A000217, A000330, A000537, A000538, A000539, A136047, A140113.
%K A140155 nonn
%O A140155 1,2
%A A140155 _Artur Jasinski_, May 12 2008