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 A135276 #52 May 02 2024 14:45:16 %S A135276 0,1,3,4,8,9,15,16,24,25,35,36,48,49,63,64,80,81,99,100,120,121,143, %T A135276 144,168,169,195,196,224,225,255,256,288,289,323,324,360,361,399,400, %U A135276 440,441,483,484,528,529,575,576,624,625,675,676,728,729,783,784,840,841,899,900,960,961 %N A135276 a(0)=0, a(1)=1; for n>1, a(n) = a(n-1) + n^0 if n odd, a(n) = a(n-1) + n^1 if n is even. %C A135276 Index to family of sequences of the form a(n) = a(n-1) + n^r if n odd, a(n) = a(n-1)+ n^s if n is even, for n > 1 and a(1)=1: %C A135276 s=0, s=1, s=2, s=3, s=4, s=5 %C A135276 r=0, A000027, this seq, A135301, A135332, A140142, A140143; %C A135276 r=1, A140144, A000217, A140113, A140145, A140146, A140147; %C A135276 r=2, A140148, A136047, A000330, A140149, A140150, A140151; %C A135276 r=3, A140152, A140153, A140154, A000537, A140155, A140156; %C A135276 r=4, A140157, A140158, A140159, A140160, A000538, A140161; %C A135276 r=5, A140162, A140163, A135095, A135099, A135214, A000539. %C A135276 Equals triangle A070909 * [1,2,3,...]. - _Gary W. Adamson_, May 16 2010 %C A135276 Right edge of the triangle in A199332: a(n) = A199332(n,n), for n > 0. - _Reinhard Zumkeller_, Nov 23 2011 %H A135276 G. C. Greubel, <a href="/A135276/b135276.txt">Table of n, a(n) for n = 0..1000</a> %H A135276 Girtrude Hamm, <a href="https://arxiv.org/abs/2304.03007">Classification of lattice triangles by their two smallest widths</a>, arXiv:2304.03007 [math.CO], 2023. %H A135276 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1). %F A135276 a(n) = (n/2 + 1)^2 - 1 if n is even, ((n+1)/2)^2 if n is odd. - _M. F. Hasler_, May 17 2008 %F A135276 From _R. J. Mathar_, Feb 22 2009: (Start) %F A135276 G.f.: x*(1+2*x-x^2)/((1+x)^2*(1-x)^3). %F A135276 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). (End) %F A135276 a(n) = (2*n^2 + 6*n + 1 + (2*n-1)*(-1)^n)/8. - _Luce ETIENNE_, Jul 08 2014 %F A135276 a(n) = (floor(n/2)+1)^2 + (n mod 2) - 1. - _Wesley Ivan Hurt_, Mar 22 2016 %F A135276 a(n) = A004526((n+1)^2) - A004526(n+1)^2. - _Bruno Berselli_, Oct 21 2016 %F A135276 Sum_{n>=1} 1/a(n) = 3/4 + Pi^2/6. - _Amiram Eldar_, Sep 08 2022 %p A135276 A135276:=n->( 2*n^2 + 6*n + 1 + (2*n-1)*(-1)^n )/8: seq(A135276(n), n=0..100); # _Wesley Ivan Hurt_, Mar 22 2016 %t A135276 a = {}; r = 0; s = 1; 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, 0, 100}]; a (* _Artur Jasinski_ *) %t A135276 LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 3, 4, 8}, 50] (* _G. C. Greubel_, Oct 08 2016 *) %o A135276 (PARI) A135276(n)=if(n%2,((n+1)/2)^2,(n/2+1)^2-1) \\ _M. F. Hasler_, May 17 2008 %o A135276 (PARI) my(x='x+O('x^200)); concat(0, Vec(x*(1+2*x-x^2)/((1+x)^2*(1-x)^3))) \\ _Altug Alkan_, Mar 23 2016 %o A135276 (Magma) [(2*n^2+6*n+1+(2*n-1)*(-1)^n)/8 : n in [0..100]]; // _Wesley Ivan Hurt_, Mar 22 2016 %Y A135276 Cf. A000027, A000217, A000330, A000537, A000538, A000539, A004526, A136047, A140113. %Y A135276 Cf. A070909. - _Gary W. Adamson_, May 16 2010 %K A135276 nonn,easy %O A135276 0,3 %A A135276 _Artur Jasinski_, May 12 2008, corrected May 17 2008 %E A135276 Offset corrected by _R. J. Mathar_, Feb 22 2009 %E A135276 Edited by _Michel Marcus_, Apr 07 2023