cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A173009 Expansion of o.g.f. x*(1 - x + x^2)/(1 -3*x +x^2 +3*x^3 -2*x^4).

This page as a plain text file.
%I A173009 #22 Feb 20 2021 23:12:31
%S A173009 0,1,2,6,13,29,60,124,251,507,1018,2042,4089,8185,16376,32760,65527,
%T A173009 131063,262134,524278,1048565,2097141,4194292,8388596,16777203,
%U A173009 33554419,67108850,134217714,268435441,536870897
%N A173009 Expansion of o.g.f. x*(1 - x + x^2)/(1 -3*x +x^2 +3*x^3 -2*x^4).
%C A173009 The mean value m(n) = Sum_{k=0..(2^n -n-1)} k*p(n,k) of the distribution function p(n,k) = binomial(2^n-n-1, k)/2^(2^n-n-1) is 0., 0.5, 2., 5.5, 13., 28.5, 60., 123.5, 251., 506.5, 1018., 2041.5, 4089., 8184.5... We set a(n) = round(m(n)).
%C A173009 The half-integer sequence h(n) = 0, 1/2, 2, 11/2, 13, 57/2, 60, 247/2, 251, 1013/2, 1018, 4083/2, 4089, 16369/2, 16376, 65519/2, 65527, ... is the binomial transform of 0, 1/2, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
%H A173009 G. C. Greubel, <a href="/A173009/b173009.txt">Table of n, a(n) for n = 1..1000</a>
%H A173009 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-3,2).
%F A173009 G.f.: x*(1 - x + x^2)/(1 -3*x +x^2 +3*x^3 -2*x^4).
%F A173009 m(n) = (1/4)*2^n - 1/2 + m*(n-1) with m(1)=0 and a(n) = round(m(n)).
%F A173009 a(1)=0, a(2)=1, a(3)=2, a(4)=6, a(n) = 3*a(n-1) -a(n-2) -3*a(n-3) +2*a(n-4). - _Harvey P. Dale_, Nov 16 2011
%F A173009 a(n) = round(A000295(n)/2). - _G. C. Greubel_, Feb 20 2021
%p A173009 A173009:= n-> round((2^n -n-1)/2); seq(A173009(n), n=1..40); # _G. C. Greubel_, Feb 20 2021
%t A173009 Table[Ceiling[(2^n-n-1)/2],{n,30}] (* or *) LinearRecurrence[{3,-1,-3,2},{0,1,2,6},30] (* _Harvey P. Dale_, Nov 16 2011 *)
%o A173009 (PARI) a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 2,-3,-1,3]^(n-1)*[0;1;2;6])[1,1] \\ _Charles R Greathouse IV_, Apr 18 2020
%o A173009 (Sage) [round((2^n -n-1)/2) for n in (1..40)] # _G. C. Greubel_, Feb 20 2021
%o A173009 (Magma) [Round((2^n -n-1)/2): n in [1..40]]; // _G. C. Greubel_, Feb 20 2021
%Y A173009 Cf. A000295, A016031, A173010.
%K A173009 nonn,easy
%O A173009 1,3
%A A173009 _Thomas Wieder_, Feb 07 2010