%I #31 Sep 08 2022 08:46:23
%S 2,3,4,7,6,11,8,15,10,19,12,23,14,27,16,31,18,35,20,39,22,43,24,47,26,
%T 51,28,55,30,59,32,63,34,67,36,71,38,75,40,79,42,83,44,87,46,91,48,95,
%U 50,99,52,103,54,107,56,111,58,115,60,119,62,123,64,127,66
%N a(n) = n+2 if n is even, otherwise a(n) = 2*n+1 if n is odd.
%C For n >= 3, a(n) is the Harborth Constant for the Dihedral groups D2n. See Balachandra link, Theorem 1 p. 2.
%H Colin Barker, <a href="/A321220/b321220.txt">Table of n, a(n) for n = 0..1000</a>
%H Niranjan Balachandran, Eshita Mazumdar, Kevin Zhao, <a href="https://arxiv.org/abs/1803.08286">The Harborth Constant for Dihedral Groups</a>, arXiv:1803.08286 [math.CO], 2018.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1).
%F a(n) = A043547(n+1) + 1.
%F From _Colin Barker_, Oct 31 2018: (Start)
%F G.f.: (2 + 3*x + x^3) / (1-x^2)^2.
%F a(n) = 2*a(n-2) - a(n-4) for n > 3.
%F (End)
%p a:=n->`if`(modp(n,2)=0,n+2,2*n+1): seq(a(n),n=0..70); # _Muniru A Asiru_, Oct 31 2018
%t CoefficientList[Series[(2 + 3 x + x^3)/(1 - x^2)^2, {x, 0, 64}], x] (* _Michael De Vlieger_, Oct 31 2018 *)
%t Table[If[OddQ[n], (2 n + 1), n + 2], {n, 0, 80}] (* _Vincenzo Librandi_, Nov 01 2018 *)
%o (PARI) a(n) = if (n%2, 2*n+1, n+2);
%o (PARI) Vec((2 + 3*x + x^3) / ((1 - x)^2*(1 + x)^2) + O(x^80)) \\ _Colin Barker_, Oct 31 2018
%o (Magma) [IsOdd(n) select (2*n+1) else n+2: n in [0..80]]; // _Vincenzo Librandi_, Nov 01 2018
%Y A299174 and A004767 interleaved.
%Y Cf. A043547, A114752.
%K nonn,easy
%O 0,1
%A _Michel Marcus_, Oct 31 2018