A316966 Same as A316671, except numbering of the squares starts at 0 rather than 1.
0, 4, 3, 11, 10, 22, 21, 37, 36, 56, 55, 79, 78, 106, 105, 137, 136, 172, 171, 211, 210, 254, 253, 301, 300, 352, 351, 407, 406, 466, 465, 529, 528, 596, 595, 667, 666, 742, 741, 821, 820, 904, 903, 991, 990, 1082, 1081, 1177, 1176, 1276, 1275, 1379, 1378
Offset: 0
Links
- Daniël Karssen, Table of n, a(n) for n = 0..9999
- Daniël Karssen, Figure showing the first 6 steps of the sequence
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
Mathematica
Table[1 + (n + 2) (n - (-1)^n)/2, {n, 0, 60}] (* Bruno Berselli, Jul 19 2018 *)
-
PARI
concat(0, Vec(x*(4 - x + x^3) / ((1 - x)^3*(1 + x)^2) + O(x^40))) \\ Colin Barker, Jul 19 2018
Formula
a(n) = A316671(n+1) - 1.
From Colin Barker, Jul 19 2018: (Start)
G.f.: x*(4 - x + x^3) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4. (End)
a(n) = 1 + (n + 2)*(n - (-1)^n)/2. - Bruno Berselli, Jul 19 2018
Comments