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.

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

This page as a plain text file.
%I A140148 #14 Jan 02 2024 09:01:18
%S A140148 1,2,11,12,37,38,87,88,169,170,291,292,461,462,687,688,977,978,1339,
%T A140148 1340,1781,1782,2311,2312,2937,2938,3667,3668,4509,4510,5471,5472,
%U A140148 6561,6562,7787,7788,9157,9158,10679,10680,12361,12362,14211,14212,16237
%N A140148 a(1)=1, a(n)=a(n-1)+n^2 if n odd, a(n)=a(n-1)+ n^0 if n is even.
%H A140148 Harvey P. Dale, <a href="/A140148/b140148.txt">Table of n, a(n) for n = 1..1000</a>
%H A140148 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1, 3, -3, -3, 3, 1, -1).
%F A140148 a(n)=a(n-1)+3a(n-2)-3a(n-3)-3a(n-4)+3a(n-5)+a(n-6)-a(n-7). G.f.: x*(1+x+6*x^2-2*x^3+x^4+x^5)/((1+x)^3*(x-1)^4). [From _R. J. Mathar_, Feb 22 2009]
%t A140148 a = {}; r = 2; 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 A140148 nxt[{n_,a_}]:={n+1,If[EvenQ[n],a+(n+1)^2,a+1]}; NestList[nxt,{1,1},50][[All,2]] (* _Harvey P. Dale_, Sep 05 2021 *)
%Y A140148 Cf. A000027, A000217, A000330, A000537, A000538, A000539, A136047, A140113.
%K A140148 nonn
%O A140148 1,2
%A A140148 _Artur Jasinski_, May 12 2008