%I #62 Sep 08 2022 08:45:08
%S 0,24,840,28560,970224,32959080,1119638520,38034750624,1292061882720,
%T 43892069261880,1491038293021224,50651409893459760,
%U 1720656898084610640,58451683124983302024,1985636569351347658200,67453191674820837076800,2291422880374557112953024
%N Numbers n such that (n+1)*(2*n+1) is a perfect square.
%C Equivalently, both n+1 and 2*n+1 are perfect squares.
%C The square roots of (n+1)*(2*n+1) are in A046176.
%C Also numbers n such that 3*A000217(n) + A000217(n+1) is a perfect square. - _Bruno Berselli_, Nov 17 2016
%C From _Sergey Pavlov_, Mar 14 2017: (Start)
%C The sequence of areas k(n)*q(n)/2, of the ordered Pythagorean triples (k(n), q(n) = k(n) + 2, c(n)) with k(1)=0, q(1)=2, c(1)=0, a(1)=0, and k(2)=6, q(2)=8, c(2)=10, a(2)=24 (conjectured).
%C Conjecture: let f(n) be a sequence of form x(n)*y(n)/2, of the ordered Pythagorean triples (x(n), y(n) = x(n) + v, z(n)) with x(1)=0, y(1)=v, z(1)=0, f(1)=0, where v is an even number. Then there exists such subset p(i) that p(1) = 0, p(2) = 24*(v/2)^2, for any i > 2, p(i) = 34*p(i-1) - p(i-2) + 24*(v/2)^2, and any p(i) is a term of the above sequence f(n) (see also the first formula by _Benoit Cloitre_ in the Formula section).
%C (End)
%H Colin Barker, <a href="/A078522/b078522.txt">Table of n, a(n) for n = 1..650</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (35,-35,1).
%F From _Benoit Cloitre_, Jan 19 2003: (Start)
%F a(1)=0, a(2)=24; for n > 2, a(n) = 34*a(n-1) - a(n-2) + 24.
%F a(n) = floor(A*B^n), where A = (3 + 2*sqrt(2))/8 and B = 17 + 12*sqrt(2).
%F a(n) = A008844(n) - 1. (End)
%F From _R. J. Mathar_, Sep 21 2011: (Start)
%F G.f.: 24*x^2/( (1-x)*(1-34*x+x^2) ).
%F a(n) = 24*A029546(n-2). (End)
%F a(n) = (A001653(n)^2 - 1)/2 = A002315(n-1)^2 - 1. - _Tomohiro Yamada_, Sep 15 2019
%F a(n) = (3/4)*(ChebyshevT(n, 17) - 16*Chebyshev(n-1, 17) - 1). - _G. C. Greubel_, Jan 13 2020
%p seq(coeff(series(24*x^2/((1-x)*(1-34*x+x^2)), x, n+1), x, n), n = 1..20); # _G. C. Greubel_, Jan 13 2020
%t RecurrenceTable[{a[1]==0, a[2]==24, a[n]==34a[n-1] -a[n-2] +24}, a[n], {n,20}]
%t Drop[CoefficientList[Series[24*x^2/((1-x)*(1-34*x+x^2)), {x,0,20}], x], 1] (* _Indranil Ghosh_, Mar 15 2017 *)
%t Table[3*(ChebyshevT[n, 17] -16*ChebyshevU[n-1, 17] -1)/4, {n,20}] (* _G. C. Greubel_, Jan 13 2020 *)
%o (PARI) concat(0, Vec(24*x^2/((1-x)*(1-34*x+x^2)) + O(x^20))) \\ _Colin Barker_, Nov 21 2016
%o (Magma) I:=[0,24]; [n le 2 select I[n] else 34*Self(n-1) - Self(n-2) + 24: n in [1..20]]; // _Marius A. Burtea_, Sep 15 2019
%o (Sage)
%o def A078522_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P( 24*x^2/((1-x)*(1-34*x+x^2)) ).list()
%o a=A078522_list(20); a[1:] # _G. C. Greubel_, Jan 13 2020
%o (GAP) a:=[0,24];; for n in [3..20] do a[n]:=34*a[n-1]-a[n-2]+24; od; a; # _G. C. Greubel_, Jan 13 2020
%Y Cf. A000217, A008844, A009111, A029546, A029549, A046176.
%Y Cf. A278310: numbers m such that T(m) + 3*T(m+1) is a square.
%K nonn,easy
%O 1,2
%A _Joseph L. Pe_, Jan 07 2003
%E Edited by _Bruno Berselli_, Nov 17 2016