OFFSET
0,2
COMMENTS
A083362 is the square table of least distinct positive integers such that the sum of any two consecutive terms in any row form a square.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(2n) = n(n+1)(4n+3)+(2n+1), a(2n+1) = ((n+1)^2)(4n+3)+(2n+2), for n>=0. - Paul D. Hanna, Apr 30 2003
a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7). - Colin Barker, Sep 26 2014
G.f.: (x^5+6*x^4+3*x^3+9*x^2+4*x+1) / ((x-1)^4*(x+1)^3). - Colin Barker, Sep 26 2014
a(n) = (4*n^3+12*n^2+18*n+9+(2*n^2+2*n-1)*(-1)^n)/8. - Wesley Ivan Hurt, Sep 26 2014
MAPLE
A083364:=n->(4*n^3+12*n^2+18*n+9+(2*n^2+2*n-1)*(-1)^n)/8: seq(A083364(n), n=0..40); # Wesley Ivan Hurt, Sep 26 2014
MATHEMATICA
Table[(4 n^3 + 12 n^2 + 18 n + 9 + (2 n^2 + 2 n - 1) (-1)^n)/8, {n, 0, 50}] (* Wesley Ivan Hurt, Sep 26 2014 *)
LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {1, 5, 17, 32, 71, 105, 187}, 50] (* Harvey P. Dale, Aug 16 2021 *)
PROG
(PARI) Vec((x^5+6*x^4+3*x^3+9*x^2+4*x+1)/((x-1)^4*(x+1)^3) + O(x^100)) \\ Colin Barker, Sep 26 2014
(Magma) [(4*n^3+12*n^2+18*n+9+(2*n^2+2*n-1)*(-1)^n)/8 : n in [0..40]]; // Wesley Ivan Hurt, Sep 26 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul D. Hanna, Apr 27 2003
STATUS
approved