A320281 Terms that are on the positive x-axis of the square spiral built with 2*k, 2*k+1, 2*k+1 for k >= 0.
0, 1, 7, 18, 35, 57, 84, 117, 155, 198, 247, 301, 360, 425, 495, 570, 651, 737, 828, 925, 1027, 1134, 1247, 1365, 1488, 1617, 1751, 1890, 2035, 2185, 2340, 2501, 2667, 2838, 3015, 3197, 3384, 3577, 3775, 3978
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
Crossrefs
Cf. A000969.
Programs
-
Mathematica
LinearRecurrence[{2,-1,1,-2,1},{0,1,7,18,35},100] (* Paolo Xausa, Nov 13 2023 *)
-
PARI
concat(0, Vec(x*(1 + 5*x + 5*x^2 + 5*x^3) / ((1 - x)^3*(1 + x + x^2)) + O(x^50))) \\ Colin Barker, Oct 09 2018
Formula
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5), a(0)=0, a(1)=1, a(2)=7, a(3)=18, a(4)=35.
a(n+2) - 2*a(n-1) + a(n) = period 3: repeat [5, 5, 6].
a(-n) = 0, 5, 15, 30, 51, 77, 108, 145, ... is the sequence of the terms on the positive y-axis.
G.f.: x*(1 + 5*x + 5*x^2 + 5*x^3) / ((1 - x)^3*(1 + x + x^2)). - Colin Barker, Oct 09 2018
Comments