Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #27 Apr 14 2021 22:26:15
%S 4,8,14,25,48,99,215,482,1100,2534,5865,13606,31599,73425,170656,
%T 396688,922146,2143685,4983416,11584987,26931775,62608726,145547572,
%U 338356994,786584517,1828587086,4250949167,9882257793,22973462076,53406819752,124155792838
%N Expansion of g.f. x*(x^4 - 5*x^3 + 10*x^2 - 12*x + 4)/((1-x)^2*(1 - 3*x + 2*x^2 - x^3)).
%H G. C. Greubel, <a href="/A129080/b129080.txt">Table of n, a(n) for n = 1..1000</a>
%H Shigeki Akiyama, <a href="http://math.tsukuba.ac.jp/~akiyama/papers/cargese_note.pdf">Pisot number system and its dual tiling</a>, in: "Physics and Theoretical Computer Science", ed. by J. P. Gazeau et al., IOS Press (2007) 133-154.
%H Petr Ambroz, Christiane Frougny, Zuzana Masakova and Edita Pelantova, <a href="http://arxiv.org/abs/math/0603608">Palindromic complexity of infinite words associated with simple Parry numbers</a>, arXiv:math/0603608 [math.CO], 2006.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-9,8,-4,1)
%F a(n) = a(n-1) + A095263(n) - A095263(n-1) + 2.
%F G.f.: x*(x^4 - 5*x^3 + 10*x^2 - 12*x + 4)/((1-x)^2*(1 - 3*x + 2*x^2 - x^3)). [Maksym Voznyy (voznyy(AT)mail.ru), Aug 14 2009; corrected by _R. J. Mathar_, Sep 16 2009]
%F a(n) = A095263(n) + 2*n + 1. - _G. C. Greubel_, Apr 12 2021
%p m:=40; S:=series( x*(x^4-5*x^3+10*x^2-12*x+4)/((1-x)^2*(1-3*x+2*x^2-x^3)), x, m+1):
%p seq(coeff(S, x, j), j=1..m); # _G. C. Greubel_, Apr 12 2021
%t (* b = A095263 *)
%t b[n_]:= b[n]= If[n<4, 2^n -1, 3*b[n-1] -2*b[n-2] +b[n-3]];
%t a[n_]:= a[n]= If[n==1, 4, a[n-1] +b[n] -b[n-1] +2];
%t Table[a[n], {n, 40}] (*modified by _G. C. Greubel_, Apr 12 2021 *)
%t LinearRecurrence[{5,-9,8,-4,1},{4,8,14,25,48},40] (* _Harvey P. Dale_, Feb 14 2015 *)
%o (Magma)
%o b:= func< n | n lt 4 select 2^n -1 else 3*Self(n-1) -2*Self(n-2) +Self(n-3) >;
%o [2*n+1+b(n): n in [1..40]]; // _G. C. Greubel_, Apr 12 2021
%o (Sage)
%o @CachedFunction
%o def b(n): return 2^n -1 if n < 4 else 3*b(n-1) -2*b(n-2) +b(n-3)
%o [2*n+1 +b(n) for n in (1..40)] # _G. C. Greubel_, Apr 12 2021
%Y Cf. A095263.
%K nonn,easy
%O 1,1
%A _Roger L. Bagula_, May 11 2007
%E Edited by _G. C. Greubel_, Apr 12 2021
%E New name using Maksym Voznyy's g.f., _Joerg Arndt_, Apr 13 2021