%I #38 Sep 08 2022 08:45:38
%S 1,4,17,40,73,116,169,232,305,388,481,584,697,820,953,1096,1249,1412,
%T 1585,1768,1961,2164,2377,2600,2833,3076,3329,3592,3865,4148,4441,
%U 4744,5057,5380,5713,6056,6409,6772,7145,7528,7921,8324,8737,9160,9593,10036
%N a(n) = 8 - 12*n + 5*n^2.
%C For n > 1, a(n) is square if and only if n-1 is in A081016.
%C a(n) and a(-n) give all numbers m such that 5*m-4 is a square. - _Bruno Berselli_, Feb 03 2016
%H G. C. Greubel, <a href="/A145995/b145995.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F a(n) = a(n-1) + 10*n - 17, with a(1)=1. - _Vincenzo Librandi_, Nov 26 2010
%F From _G. C. Greubel_, Jan 30 2016 (Start)
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>3, a(1)=1, a(2)=4, a(3)=17.
%F G.f.: x*(1 + x + 8*x^2)/(1-x)^3.
%F E.g.f.: (5*x^2 - 7*x + 8)*exp(x) - 8. (End)
%e A081016(0) = 1 and a(2) = 2^2 = 4; A081016(1) = 6 and a(7) = 13^2 = 169; A081016(2) = 40 and a(41) = 89^2 = 7921; A081016(3) = 273 and a(274) = 610^2 = 372100; A081016(4) = 1870 and a(1871) = 4181^2 = 17480761. - _Klaus Brockhaus_, Oct 29 2008
%t Table[8 -12x +5x^2, {x,50}]
%t s = 1; lst = {s}; Do[s += n + 2; AppendTo[lst, s], {n, 1, 450, 10}]; lst (* _Zerinvary Lajos_, Jul 11 2009 *)
%t LinearRecurrence[{3, -3, 1}, {1, 4, 17}, 51] (* _G. C. Greubel_, Jan 30 2016 *)
%o (PARI) for(n=1, 50, print1(8-12*n+5*n^2, ",")) \\ _Klaus Brockhaus_, Oct 29 2008
%o (Magma) [8-12*n+5*n^2: n in [1..50]]; // _G. C. Greubel_, Jul 15 2019
%o (Sage) [8-12*n+5*n^2 for n in (1..50)] # _G. C. Greubel_, Jul 15 2019
%o (GAP) List([1..50], n-> 8-12*n+5*n^2); # _G. C. Greubel_, Jul 15 2019
%Y Cf. A081016, A000217, A080855.
%Y Cf. A195162 (numbers m such that 5*m+4 is a square).
%K nonn,easy
%O 1,2
%A _Artur Jasinski_, Oct 26 2008
%E Corrected definition; corrected comment; added keyword. - _Klaus Brockhaus_, Oct 29 2008
|