login
Add three, add six, add nine, ....
3

%I #38 Jan 16 2024 14:15:56

%S 5,8,14,23,35,50,68,89,113,140,170,203,239,278,320,365,413,464,518,

%T 575,635,698,764,833,905,980,1058,1139,1223,1310,1400,1493,1589,1688,

%U 1790,1895,2003,2114,2228,2345,2465,2588,2714,2843,2975,3110,3248,3389,3533

%N Add three, add six, add nine, ....

%C Found on a quiz.

%C 3*(8*a(n) - 37) = A016945(n-1)^2. - _Vincenzo Librandi_, Feb 15 2012

%H Vincenzo Librandi, <a href="/A124011/b124011.txt">Table of n, a(n) for n = 1..1000</a>

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

%F a(n) = 3*n*(n+1)/2 + 5 = 3*A000217(n-1) + 5 = A045943(n) + 5.

%F a(n) = 3*n + a(n-1) - 3 with a(1)=5. - _Vincenzo Librandi_, Nov 28 2009

%F G.f.: x*(5 - 7*x + 5*x^2)/(1-x)^3. - _Colin Barker_, Jan 14 2012

%t LinearRecurrence[{3,-3,1},{5,8,14},50] (* _Vincenzo Librandi_, Feb 15 2012 *)

%t Table[(3x^2-3x+10)/2,{x,50}] (* _Harvey P. Dale_, Jul 25 2019 *)

%t Accumulate[3*Range[0,50]]+5 (* _Harvey P. Dale_, Jan 16 2024 *)

%o (Magma) I:=[5,8,14]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..50]]; // _Vincenzo Librandi_, Feb 15 2012

%o (PARI) a(n)=3*n*(n+1)/2+5 \\ _Charles R Greathouse IV_, Jun 17 2017

%K nonn,easy

%O 1,1

%A Ruben Fritzon (ruben.fritzon(AT)edu.ovanaker.se), Dec 11 2006

%E More terms from Graham Roy (groy(AT)ashland.edu), Dec 14 2006

%E Additional comments from Christopher N. Swanson (cswanson(AT)ashland.edu), _R. J. Mathar_, Dec 14 2006