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 A140113 #42 Dec 31 2023 10:21:44 %S A140113 1,5,8,24,29,65,72,136,145,245,256,400,413,609,624,880,897,1221,1240, %T A140113 1640,1661,2145,2168,2744,2769,3445,3472,4256,4285,5185,5216,6240, %U A140113 6273,7429,7464,8760,8797,10241,10280,11880,11921,13685,13728,15664,15709 %N A140113 a(1)=1, a(n)=a(n-1)+n if n odd, a(n)=a(n-1)+ n^2 if n is even. %C A140113 One notices the powers 8, 256, 400, and 2744 (14^3) and wonders if the sum is ever again a power. [_J. M. Bergot_, Sep 07 2011] %H A140113 Vincenzo Librandi, <a href="/A140113/b140113.txt">Table of n, a(n) for n = 1..1000</a> %H A140113 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3,-3,3,1,-1). %F A140113 O.g.f.: (-x^4 + 4*x^3 + 4*x + 1)/(x^7 - x^6 - 3*x^5 + 3*x^4 + 3*x^3 - 3*x^2 - x + 1). - _Alexander R. Povolotsky_, May 08 2008 %F A140113 a(2*n) = A185872(n,2); a(2*n-1) = A100178(n). - _Franck Maminirina Ramaharo_, Feb 26 2018 %t A140113 nxt[{n_,a_}]:={n+1,If[EvenQ[n],a+n+1,a+(n+1)^2]}; Transpose[ NestList[ nxt,{1,1},50]][[2]] (* or *) LinearRecurrence[{1,3,-3,-3,3,1,-1},{1,5,8,24,29,65,72},50] (* _Harvey P. Dale_, Jul 22 2014 *) %t A140113 CoefficientList[Series[(- x^4 + 4 x^3 + 4 x + 1)/(x^7 - x^6 - 3 x^5 + 3 x^4 + 3 x^3 - 3 x^2 - x + 1), {x, 0, 40}], x] (* _Vincenzo Librandi_, Jul 23 2014 *) %o A140113 (PARI) print1(a=1);for(n=2,99,print1(", ",a+=n^(2-n%2))) \\ _Charles R Greathouse IV_, Jul 19 2011 %Y A140113 Cf. A136047. %K A140113 nonn,easy %O A140113 1,2 %A A140113 _Artur Jasinski_, May 08 2008