OFFSET
0,2
COMMENTS
The sequence has been extended to a(0) using the recurrence. - Andrew Howroyd, Feb 19 2026
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Andrew Howroyd, Mutual visibility sets in the n-necklace graph, Feb 2026.
Eric Weisstein's World of Mathematics, Necklace Graph.
Eric Weisstein's World of Mathematics, Visibility Polynomial.
Index entries for linear recurrences with constant coefficients, signature (4,9,-48,-21,228,-35,-544,237,684,-405,-432,297,108,-81).
FORMULA
From Andrew Howroyd, Feb 19 2026: (Start)
a(n) = 3^n + n*(27*n^2 - 6*n + 5)/2 - 7*n*binomial(floor((3*n-1)/2), 2) + 4*n*Sum_{k=0..floor(n/2)-1} ((floor(3*n/2)-3*k-3)^2 + (3*n-3*k-4))*3^k.
G.f.: (1 + 12*x + 39*x^2 - 226*x^3 - 352*x^4 + 279*x^5 + 1644*x^6 + 1900*x^7 - 3501*x^8 - 5934*x^9 + 3429*x^10 + 5166*x^11 - 1404*x^12 - 189*x^13)/((1 - x)^4*(1 + x)^3*(1 - 3*x)*(1 - 3*x^2)^3). (End)
a(n) = 4*a(n-1)+9*a(n-2)-48*a(n-3)-21*a(n-4)+228*a(n-5)-35*a(n-6)-544*a(n-7)+237*a(n-8)+684*a(n-9)-405*a(n-10)-432*a(n-11)+297*a(n-12)+108*a(n-13)-81*a(n-14). - Eric W. Weisstein, Feb 19 2026
MATHEMATICA
Table[3^n + 1/2 3^(n/2) n (19 + 10 Sqrt[3] + (3 + Sqrt[3]) n) + 3/16 n (-107 + 6 (-3 + n) n) + 1/16 (-1)^n n (-55 + 18 n - 8 3^(n/2) (-19 + 10 Sqrt[3] + (-3 + Sqrt[3]) n)), {n, 20}] // Expand
LinearRecurrence[{4, 9, -48, -21, 228, -35, -544, 237, 684, -405, -432, 297, 108, -81}, {16, 112, 318, 1139, 2213, 6744, 11875, 34669, 61542, 178784, 346316, 1013919, 2249731, 6652984}, 20]
CoefficientList[Series[(16 + 48 x - 274 x^2 - 373 x^3 + 507 x^4 + 1609 x^5 + 1356 x^6 - 3264 x^7 - 5250 x^8 + 3024 x^9 + 4734 x^10 - 1107 x^11 - 81 x^12 - 81 x^13)/((-1 + x)^4 (-1 + 3 x) (-1 - x + 3 x^2 + 3 x^3)^3), {x, 0, 20}], x]
PROG
(PARI) a(n) = 3^n + n*(27*n^2 - 6*n + 5)/2 - 7*n*binomial(floor((3*n-1)/2), 2) + 4*n*sum(k=0, n\2-1, ((3*n\2-3*k-3)^2 + (3*n-3*k-4))*3^k) \\ Andrew Howroyd, Feb 19 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Feb 15 2026
EXTENSIONS
a(0) prepended and a(9) onward from Andrew Howroyd, Feb 19 2026
STATUS
approved
