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.

A374084 a(n) = (1 + (n+1)^2 + (n-2)*(-1)^n)/2.

This page as a plain text file.
%I A374084 #12 Jul 08 2024 08:53:35
%S A374084 3,5,8,14,17,27,30,44,47,65,68,90,93,119,122,152,155,189,192,230,233,
%T A374084 275,278,324,327,377,380,434,437,495,498,560,563,629,632,702,705,779,
%U A374084 782,860,863,945,948,1034,1037,1127,1130,1224,1227,1325,1328,1430,1433,1539
%N A374084 a(n) = (1 + (n+1)^2 + (n-2)*(-1)^n)/2.
%C A374084 Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is column 2 of the boustrophedon-style array (see example).
%C A374084 In general, column k is given by (1+(t-1)^2+(n-k)*(-1)^t)/2, t = n+k. Here, k=2.
%H A374084 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).
%F A374084 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
%F A374084 G.f.: -x*(2*x^3-3*x^2+2*x+3)/((x+1)^2*(x-1)^3).
%F A374084 a(n) = A128918(n+1) - (-1)^n.
%F A374084 E.g.f.: (2 + x)*(exp(x)*x + 2*sinh(x))/2. - _Stefano Spezia_, Jun 29 2024
%e A374084        [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
%e A374084   [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
%e A374084   [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
%e A374084   [ 3]   6    8   13   19   24   34   39   53   58   76   ...
%e A374084   [ 4]   7   14   18   25   33   40   52   59   75   ...
%e A374084   [ 5]  15   17   26   32   41   51   60   74   ...
%e A374084   [ 6]  16   27   31   42   50   61   73   ...
%e A374084   [ 7]  28   30   43   49   62   72   ...
%e A374084   [ 8]  29   44   48   63   71   ...
%e A374084   [ 9]  45   47   64   70   ...
%e A374084   [10]  46   65   69   ...
%e A374084   [11]  66   68   ...
%e A374084   [12]  67   ...
%e A374084         ...
%t A374084 CoefficientList[Series[-(2*x^3 - 3*x^2 + 2*x + 3)/((x + 1)^2*(x - 1)^3), {x, 0, 50}], x]
%t A374084 k := 2; Table[(1 + (n + k - 1)^2 + (n - k) (-1)^(n + k))/2, {n, 60}]
%o A374084 (Magma) [(1 + (n+1)^2 + (n-2)*(-1)^n)/2: n in [1..80]];
%o A374084 (Python)
%o A374084 def A374084(n): return (n*(n+1)+4 if n&1 else n*(n+3))>>1 # _Chai Wah Wu_, Jul 07 2024
%Y A374084 Cf. A128918 (Column 1) n>0, this sequence (Column 2).
%Y A374084 Column 2 of the table in A056011.
%Y A374084 Row 2 of the rectangular array in A056023.
%K A374084 nonn,easy
%O A374084 1,1
%A A374084 _Wesley Ivan Hurt_, Jun 27 2024