OFFSET
0,1
COMMENTS
For n >= 3, a(n) is the Harborth Constant for the Dihedral groups D2n. See Balachandra link, Theorem 1 p. 2.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Niranjan Balachandran, Eshita Mazumdar, Kevin Zhao, The Harborth Constant for Dihedral Groups, arXiv:1803.08286 [math.CO], 2018.
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
a(n) = A043547(n+1) + 1.
From Colin Barker, Oct 31 2018: (Start)
G.f.: (2 + 3*x + x^3) / (1-x^2)^2.
a(n) = 2*a(n-2) - a(n-4) for n > 3.
(End)
MAPLE
a:=n->`if`(modp(n, 2)=0, n+2, 2*n+1): seq(a(n), n=0..70); # Muniru A Asiru, Oct 31 2018
MATHEMATICA
CoefficientList[Series[(2 + 3 x + x^3)/(1 - x^2)^2, {x, 0, 64}], x] (* Michael De Vlieger, Oct 31 2018 *)
Table[If[OddQ[n], (2 n + 1), n + 2], {n, 0, 80}] (* Vincenzo Librandi, Nov 01 2018 *)
PROG
(PARI) a(n) = if (n%2, 2*n+1, n+2);
(PARI) Vec((2 + 3*x + x^3) / ((1 - x)^2*(1 + x)^2) + O(x^80)) \\ Colin Barker, Oct 31 2018
(Magma) [IsOdd(n) select (2*n+1) else n+2: n in [0..80]]; // Vincenzo Librandi, Nov 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Marcus, Oct 31 2018
STATUS
approved