OFFSET
1,1
COMMENTS
The equation n^2 + 2*(n+2)^2 = y^2 is transformed via x=3n+4 into the Diophantine equation x^2 - 3*y^2 = -8, and by division through 4 to (x/2)^2 - 3*(y/2)^2 = -2. Setting xbar = x/2 and ybar = y/2, the fundamental solution to xbar^2 - 3*ybar^2 = -2 is xbar = ybar = 1, and the general solution is given by multiplying (1+sqrt(3))*(u+sqrt(3)*v)^j, j=1,2,3,4,... where (u,v) = (A001075(j), A001353(j)). Expanding this product, isolating the square root., etc., and discarding the solutions that are associated with non-integer n generates the series of all solutions. - R. J. Mathar, May 02 2010
Also numbers n such that the sum of the four pentagonal numbers starting at index n is equal to the sum of four consecutive triangular numbers. - Colin Barker, Dec 19 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..890
Index entries for linear recurrences with constant coefficients, signature (15,-15,1).
FORMULA
From Bruno Berselli, Sep 07 2011: (Start)
G.f.: 2*x*(1+8*x-x^2)/((1-x)*(1-14*x+x^2)).
a(n) = 15*a(n-1) - 15*a(n-2) + a(n-3).
a(n) = -4/3 + ((sqrt(3)+1)^(4n-1) - (sqrt(3)-1)^(4n-1))/(3*2^(2n-1)). (End)
MATHEMATICA
eq = Simplify[n^2 + 2*(n+2)^2 == y^2 /. n -> (x - 4)/3]; r = Reduce[x >= 0 && y >= 0 && eq, x, Integers] /. C[1] -> k; xx[k_] = x /. ToRules[r[[-1, -1]]]; Select[Table[Simplify[(xx[k] - 4)/3], {k, 1, 34}], IntegerQ] (* Jean-François Alcover, Sep 06 2011, after R. J. Mathar *)
CoefficientList[Series[2 (1 + 8 x - x^2)/((1 - x) (1- 14 x + x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 24 2014 °)
PROG
(Magma) [n: n in [0..70000000] | IsSquare(3*n^2+8*n+8)];
(Magma) I:=[2, 46, 658]; [n le 3 select I[n] else 15*Self(n-1)-15*Self(n-2)+Self(n-3): n in [1..17]]; // Bruno Berselli, Sep 07 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Apr 11 2010
EXTENSIONS
More terms from R. J. Mathar, May 02 2010
STATUS
approved