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 A359366 #21 Apr 28 2025 19:10:17 %S A359366 0,1,3,4,10,9,21,16,36,25,55,36,78,49,105,64,136,81,171,100,210,121, %T A359366 253,144,300,169,351,196,406,225,465,256,528,289,595,324,666,361,741, %U A359366 400,820,441,903,484,990,529,1081,576,1176,625,1275,676,1378,729,1485 %N A359366 a(n) = (1/8)*(((3*n + 1) + (n - 1)*(-1)^n)*(n + 1)). %H A359366 Daniel Mondot, <a href="/A359366/b359366.txt">Table of n, a(n) for n = 0..9999</a> %H A359366 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-3,0,1). %F A359366 a(n) = ((n + 1) / 2)^2 if n is odd, otherwise (n^2 + n) / 2. %F A359366 a(n) = [x^n] -(x*(x^3 + x^2 + 3*x + 1))/(x^2 - 1)^3. %F A359366 a(n) = n! * [x^n] (1/4)*((1 + x*(x + 4))*sinh(x) + x*(2*x + 3)*cosh(x)). %p A359366 a := n -> (1/8)*(((3*n + 1) + (n - 1)*(-1)^n)*(n + 1)): %p A359366 # Or: %p A359366 a := n -> ifelse(irem(n, 2) = 1, ((n + 1) / 2)^2, (n^2 + n)/2): %p A359366 seq(a(n), n = 0..54); %t A359366 a[n_] := (1/8)*(((3*n + 1) + (n - 1)*(-1)^n)*(n + 1)); Array[a,55,0] (* _Stefano Spezia_, Apr 28 2025 *) %Y A359366 Cf. A000290, A014105, A106465, A056136. %K A359366 nonn,easy %O A359366 0,3 %A A359366 _Peter Luschny_, Dec 30 2022