login
a(n) = (3*n^2 + 3*n - 4)/2.
7

%I #59 Nov 23 2023 15:58:21

%S 1,7,16,28,43,61,82,106,133,163,196,232,271,313,358,406,457,511,568,

%T 628,691,757,826,898,973,1051,1132,1216,1303,1393,1486,1582,1681,1783,

%U 1888,1996,2107,2221,2338,2458,2581,2707,2836,2968,3103,3241,3382,3526,3673

%N a(n) = (3*n^2 + 3*n - 4)/2.

%C Binomial transform of 1, 6, 3 followed by A000004, i.e., 1, 6, 3, 0, 0, 0, 0, ... .

%C Row sums of triangle A133981. - _Gary W. Adamson_, Sep 30 2007

%C Equals (1, 2, 3, 4, ...) convolved with (1, 5, 3, 3, 3, ...). Example: a(4) = (1, 2, 3, 4) dot (3, 3, 5, 1) = (3 + 6 + 15 + 4) = 28. - _Gary W. Adamson_, May 01 2009

%C Equivalently, numbers of the form 3*(h+1)*(2*h-1) + 1, where h = 0, -1, 1, -2, 2, -3, 3, -4, 4, ... . - _Bruno Berselli_, Feb 03 2017

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

%H Leo Tavares, <a href="/A133694/a133694.jpg">Illustration: Triple Triangles</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*A000217(n) - 2.

%F a(n) = a(n-1) + 3*n for n > 1, a(1)=1. - _Vincenzo Librandi_, Nov 23 2010

%F G.f.: x*(1+4*x-2*x^2)/(1-x)^3. - _Vincenzo Librandi_, Mar 30 2014

%F Sum_{n>=1} 1/a(n) = 1/2 + 2*Pi*tan(sqrt(19/3)*Pi/2)/sqrt(57). - _Amiram Eldar_, Jun 08 2022

%F E.g.f.: 2 + exp(x)*(3*x*(2 + x) - 4)/2. - _Stefano Spezia_, Nov 23 2023

%e a(3) = 3*A000217(3) - 2 = 3*6 - 2 = 16.

%p A133694:=n->(3*n^2 + 3*n - 4)/2; seq(A133694(n), n=1..30); # _Wesley Ivan Hurt_, Mar 26 2014

%t Table[(3*n^2 + 3*n - 4)/2, {n, 100}]

%t CoefficientList[Series[(1 + 4 x - 2 x^2)/(1 - x)^3, {x, 0, 50}], x] (* _Vincenzo Librandi_, Mar 30 2014 *)

%t LinearRecurrence[{3,-3,1},{1,7,16},50] (* _Harvey P. Dale_, Sep 05 2020 *)

%o (Magma) a000217:=func<n | n*(n+1) div 2>; [3*a000217(n)-2: n in [1..60]];

%o (Magma) [(3*n^2+3*n-4)/2: n in [1..50]]; // _Vincenzo Librandi_, Mar 30 2014

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

%Y Cf. A000004, A000217, A133981.

%K nonn,easy

%O 1,2

%A _Gary W. Adamson_, Sep 20 2007

%E Edited by _Klaus Brockhaus_, Nov 23 2010