login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers n such that n^2 + 2*(n+2)^2 is a square.
1

%I #30 Sep 08 2022 08:45:51

%S 2,46,658,9182,127906,1781518,24813362,345605566,4813664578,

%T 67045698542,933826115026,13006519911838,181157452650722,

%U 2523197817198286,35143611988125298,489487370016555902,6817679568243657346

%N Numbers n such that n^2 + 2*(n+2)^2 is a square.

%C 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

%C 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

%H Vincenzo Librandi, <a href="/A174592/b174592.txt">Table of n, a(n) for n = 1..890</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (15,-15,1).

%F From _Bruno Berselli_, Sep 07 2011: (Start)

%F G.f.: 2*x*(1+8*x-x^2)/((1-x)*(1-14*x+x^2)).

%F a(n) = 15*a(n-1) - 15*a(n-2) + a(n-3).

%F a(n) = -4/3 + ((sqrt(3)+1)^(4n-1) - (sqrt(3)-1)^(4n-1))/(3*2^(2n-1)). (End)

%t 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_ *)

%t CoefficientList[Series[2 (1 + 8 x - x^2)/((1 - x) (1- 14 x + x^2)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Sep 24 2014 °)

%o (Magma) [n: n in [0..70000000] | IsSquare(3*n^2+8*n+8)];

%o (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

%K nonn,easy

%O 1,1

%A _Vincenzo Librandi_, Apr 11 2010

%E More terms from _R. J. Mathar_, May 02 2010