OFFSET
0,1
COMMENTS
Define the size deficiency of a graph G as the number of edges needed to complete G. If G is a cycle graph C_n, this sequence gives the values of n for which C_n has a size deficiency which is a perfect square.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
J. R. M. Antalan and I. F. Callano, On the Size Deficiency of Cycle Graphs and Some Integer Sequences, Asian Journal of Mathematics and Computer Research, 11 (3) (2016),192-200.
Mathematics Stack Exchange, Solving the nonlinear Diophantine equation x2-3x=2y^2
Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
FORMULA
a(n+2) = 6*a(n+1) - a(n) - 6; a(0) = 3 , a(1) = 6.
G.f.: 3*(1-5*x+2*x^2)/((1-x)*(1-6*x+x^2)). - Joerg Arndt, Mar 25 2016
a(n) = 3 * A055997(n+1). - Joerg Arndt, Mar 25 2016
a(n) = 7*a(n-1)-7*a(n-2)+a(n-3) for n>2. - Colin Barker, Apr 03 2016
a(n) = 3*(2+(3-2*sqrt(2))^n+(3+2*sqrt(2))^n)/4. - Colin Barker, Apr 03 2016
MATHEMATICA
a[0] = 3; a[1] = 6; a[n_] := a[n] = 6 a[n - 1] - a[n - 2] - 6; Table[a@ n, {n, 0, 24}] (* Michael De Vlieger, Mar 25 2016 *)
LinearRecurrence[{7, -7, 1}, {3, 6, 27}, 30] (* Harvey P. Dale, Jan 23 2019 *)
PROG
(PARI) is(n)=issquare(n*(n-3)/2) \\ Charles R Greathouse IV, Mar 25 2016
(PARI) a(n)=([0, 1, 0; 0, 0, 1; 1, -7, 7]^n*[3; 6; 27])[1, 1] \\ Charles R Greathouse IV, Mar 25 2016
(PARI) Vec(3*(1-5*x+2*x^2)/((1-x)*(1-6*x+x^2)) + O(x^50)) \\ Colin Barker, Apr 03 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Rafael M. Antalan, Mar 25 2016
STATUS
approved
