[go: up one dir, main page]

login
A087420
a(n) is the sum of the squares of the sizes of the conjugacy classes in the dihedral group D_2n.
1
2, 4, 14, 14, 34, 28, 62, 46, 98, 68, 142, 94, 194, 124, 254, 158, 322, 196, 398, 238, 482, 284, 574, 334, 674, 388, 782, 446, 898, 508, 1022, 574, 1154, 644, 1294, 718, 1442, 796, 1598, 878, 1762, 964, 1934, 1054, 2114, 1148, 2302, 1246, 2498, 1348, 2702
OFFSET
1,1
FORMULA
For even n, a(n) = n^2/2 + 2n - 2. For odd n, a(n) = n^2 + 2n - 1. - Eric M. Schmidt, Apr 20 2013
From Colin Barker, Feb 24 2017: (Start)
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) for n>6.
G.f.: 2*x*(1 + 2*x + 4*x^2 + x^3 - x^4 - x^5) / ((1 - x)^3*(1 + x)^3).
(End)
MATHEMATICA
Table[If[EvenQ[n], n^2/2+2n-2, n^2+2n-1], {n, 100}] (* or *) LinearRecurrence[ {0, 3, 0, -3, 0, 1}, {2, 4, 14, 14, 34, 28}, 80] (* Harvey P. Dale, Dec 15 2018 *)
PROG
(Sage) def A087420(n) : return n^2//2 + 2*n - 2 if is_even(n) else n^2 + 2*n - 1 # Eric M. Schmidt, Apr 20 2013
(PARI) Vec(2*x*(1 + 2*x + 4*x^2 + x^3 - x^4 - x^5) / ((1 - x)^3*(1 + x)^3) + O(x^70)) \\ Colin Barker, Feb 24 2017
CROSSREFS
Sequence in context: A131758 A095909 A151872 * A194388 A141654 A173338
KEYWORD
nonn,easy
AUTHOR
Yuval Dekel (dekelyuval(AT)hotmail.com), Oct 22 2003
EXTENSIONS
More terms from Eric M. Schmidt, Apr 20 2013
STATUS
approved