%I #53 Mar 10 2023 02:33:01
%S 0,1,2,3,5,10,21,43,86,171,341,682,1365,2731,5462,10923,21845,43690,
%T 87381,174763,349526,699051,1398101,2796202,5592405,11184811,22369622,
%U 44739243,89478485,178956970,357913941,715827883,1431655766,2863311531,5726623061,11453246122
%N A024494 prefixed by a 0.
%C Binomial transform of 0, 1, 0. Also A024495 = first differences.
%C Recurrence: a(n+1) - 2*a(n) = 1, 0, -1, -1, 0, 1, 1.
%C {A024493, A131708, A024495} is the difference analog of the hyperbolic functions {h_1(x), h_2(x), h_3(x)} of order 3. For the definitions of {h_i(x)} and the difference analog {H_i(n)} see [Erdelyi] and the Shevelev link respectively. - _Vladimir Shevelev_, Aug 01 2017
%D A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.
%H G. C. Greubel, <a href="/A131708/b131708.txt">Table of n, a(n) for n = 0..1000</a>
%H Antoine-Augustin Cournot, <a href="https://archive.org/download/bulletindesscie22unkngoog/">Solution d'un problème d'analyse combinatoire</a>, Bulletin des Sciences Mathématiques, Physiques et Chimiques, item 34, volume 11, 1829, pages 93-97. Also at <a href="http://books.google.com.au/books?id=B-v-eXuvoG4C">Google Books</a>. Page 97 case p=3 formula y^(1) = a(n).
%H Christian Ramus, <a href="http://gdz.sub.uni-goettingen.de/en/dms/load/toc/?PPN=PPN243919689_0011">Solution générale d'un problème d'analyse combinatoire</a>, Journal für die Reine und Angewandte Mathematik (Crelle's journal), volume 11, 1834, pages 353-355. Page 353 case p=3 formula y^(1) = a(n).
%H Vladimir Shevelev, <a href="https://arxiv.org/abs/1706.01454">Combinatorial identities generated by difference analogs of hyperbolic and trigonometric functions of order n</a>, arXiv:1706.01454 [math.CO], 2017.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,2).
%F G.f.: x*(1-x)/((1-2*x)*(1-x+x^2)). - _R. J. Mathar_, Nov 14 2007
%F Recurrences:
%F a(n) = k*a(n-1) + (6-3*k)*a(n-2) + (3*k-7)*a(n-3) + (6-2*k)*a(n-4).
%F k = 0: a(n) = 6*a(n-2) - 7*a(n-3) + 6*a(n-4).
%F k = 1: a(n) = a(n-1) + 3*a(n-2) - 4*a(n-3) + 4*a(n-4).
%F k = 2: a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4), cf. A113405, A135350.
%F k = 3: a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3), this sequence.
%F k = 4: a(n) = 4*a(n-1) - 6*a(n-2) + 5*a(n-3) - 2*a(n-4), cf. A111927.
%F k = 5: a(n) = 5*a(n-1) - 9*a(n-2) + 8*a(n-3) - 4*a(n-4), cf. A137221.
%F The sum of coefficients = 5 - k. Of the family k=3 gives the best recurrence.
%F a(n+m) = a(n)*A024493(m) + A024493(n)*a(m) + A024495(n)*A024495(m). - _Vladimir Shevelev_, Aug 01 2017
%F From _Kevin Ryde_, Sep 24 2020: (Start)
%F a(n) = (1/3)*2^n - (1/3)*cos((1/3)*Pi*n) + (1/sqrt(3))*sin((1/3)*Pi*n). [Cournot]
%F a(n) + A024495(n) + A111927(n) = 2^n - 1. [Cournot, page 96 last formula, but misprint should be 2^x - 1 rather than 2^p - 1]. (End)
%F a(n) = C(n,1) + C(n,4) + ... + C(n, 3*floor(n/3)+1). - _Jianing Song_, Oct 04 2021
%t LinearRecurrence[{3,-3,2}, {0,1,2}, 40] (* _Harvey P. Dale_, Nov 27 2013 *)
%o (PARI) v=vector(99,i,i);for(i=4,#v,v[i]=3*v[i-1]-3*v[i-2]+2*v[i-3]);v \\ _Charles R Greathouse IV_, Jun 01 2011
%o (Magma) [n le 3 select n-1 else 3*Self(n-1) -3*Self(n-2) +2*Self(n-3): n in [1..40]]; // _G. C. Greubel_, Jan 23 2023
%o (SageMath)
%o def A131708(n): return (1/3)*(2^n -chebyshev_U(n,1/2) +2*chebyshev_U(n-1,1/2))
%o [A131708(n) for n in range(41)] # _G. C. Greubel_, Jan 23 2023
%Y Cf. A024493, A024494, A024495, A111927, A113405, A135350, A137221.
%K nonn,easy
%O 0,3
%A _Paul Curtz_, Sep 14 2007, Mar 01 2008