Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #32 Sep 08 2022 08:46:07
%S 0,3,47,659,9183,127907,1781519,24813363,345605567,4813664579,
%T 67045698543,933826115027,13006519911839,181157452650723,
%U 2523197817198287,35143611988125299,489487370016555903,6817679568243657347,94958026585394646959,1322594692627281400083
%N Numbers m such that T(m)^2 + T(m^2) is a perfect square, where T = A000217.
%C The sequence of numbers k such that k^2 is representable as T(m)^2 + T(m^2) begins: 0, 9, 1927, 376289, 73032399, 14168386297, 2748600555479.
%C After 0, numbers k such that 3*k^2 + 2*k + 3 is a square. - _Bruno Berselli_, Aug 31 2017
%H Giovanni Resta, <a href="/A239450/b239450.txt">Table of n, a(n) for n = 1..500</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (15,-15,1).
%F a(n) = 15*(a(n-1) - a(n-2)) + a(n-3) for n > 4. - _Giovanni Resta_, Mar 19 2014
%F From _Bruno Berselli_, Mar 19 2014: (Start)
%F G.f.: x^2*(1 + x)*(3 - x)/((1 - x)*(1 - 14*x + x^2)).
%F a(n) = 4*A046174(n-1) - 1 for n > 1. (End)
%F a(n) = (-1 + (7 + 4*sqrt(3))^n*(-19 + 11*sqrt(3)) - (7 - 4*sqrt(3))^n*(19 + 11*sqrt(3)))/3 for n > 1. - _Colin Barker_, Mar 05 2016
%e T(3)^2 + T(3^2) = 6^2 + 9*10/2 = 36+45 = 81. Because 81 is a perfect square, 3 is in the sequence.
%t a[1]=0; a[2]=3; a[3]=47; a[4]=659; a[n_] := a[n] = 15*(a[n-1] - a[n-2]) + a[n-3]; Array[a, 50] (* _Giovanni Resta_, Mar 19 2014 *)
%t Join[{0},LinearRecurrence[{15,-15,1},{3,47,659},20]] (* _Harvey P. Dale_, Feb 02 2015 *)
%t CoefficientList[Series[x (1 + x) (3 - x) / ((1 - x) (1 - 14 x + x^2)), {x, 0, 30}], x] (* _Vincenzo Librandi_, Feb 03 2015 *)
%o (PARI) isok(n) = issquare((n*(n+1)/2)^2 + n^2*(n^2+1)/2); \\ _Michel Marcus_, Mar 19 2014
%o (Magma) I:=[0, 3, 47, 659]; [n le 4 select I[n] else 15*Self(n-1)-15*Self(n-2)+Self(n-3): n in [1..60]]; // _Vincenzo Librandi_, Feb 03 2015
%Y Cf. A000217, A000290, A046174.
%K nonn,easy
%O 1,2
%A _Alex Ratushnyak_, Mar 19 2014
%E a(11)-a(20) from _Giovanni Resta_, Mar 19 2014