login
a(n) = (-n^3 + 9n^2 - 5n + 3)/3.
18

%I #26 Sep 08 2022 08:45:45

%S 1,2,7,14,21,26,27,22,9,-14,-49,-98,-163,-246,-349,-474,-623,-798,

%T -1001,-1234,-1499,-1798,-2133,-2506,-2919,-3374,-3873,-4418,-5011,

%U -5654,-6349,-7098,-7903,-8766,-9689,-10674,-11723,-12838,-14021,-15274

%N a(n) = (-n^3 + 9n^2 - 5n + 3)/3.

%C {a(k): 0 <= k < 4} = divisors of 14:

%C a(n) = A027750(A006218(13) + k + 1), 0 <= k < A000005(14).

%H G. C. Greubel, <a href="/A161702/b161702.txt">Table of n, a(n) for n = 0..1000</a>

%H R. Zumkeller, <a href="/A161700/a161700.txt">Enumerations of Divisors</a>

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

%F a(n) = C(n,0) + C(n,1) + 4*C(n,2) - 2*C(n,3).

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

%F a(0)=1, a(1)=2, a(2)=7, a(3)=14, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - _Harvey P. Dale_, Jun 15 2013

%e Differences of divisors of 14 to compute the coefficients of their interpolating polynomial, see formula:

%e 1 2 7 14

%e 1 5 7

%e 4 2

%e -2

%p A161702:=n->(-n^3 + 9*n^2 - 5*n + 3)/3: seq(A161702(n), n=0..60); # _Wesley Ivan Hurt_, Jul 16 2017

%t Table[(-n^3+9n^2-5n+3)/3,{n,0,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{1,2,7,14},40] (* _Harvey P. Dale_, Jun 15 2013 *)

%o (Magma) [(-n^3 + 9*n^2 - 5*n + 3)/3: n in [0..50]]; // _Vincenzo Librandi_, Dec 27 2010

%o (PARI) a(n)=(-n^3+9*n^2-5*n+3)/3 \\ _Charles R Greathouse IV_, Sep 24 2015

%Y Cf. A000124, A000125, A000127, A002522, A005408, A006261, A016813, A058331, A080856, A086514, A161701, A161703, A161704, A161706-A161708, A161710, A161711-A161713, A161715.

%K sign,easy

%O 0,2

%A _Reinhard Zumkeller_, Jun 17 2009