login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079460 Let r(n) be the real positive root of Sum_{k=1..n} x^k = 1, then a(n) = round(1/(r(n) - 1/2)). 1

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

%S 2,8,23,53,115,242,496,1006,2028,4074,8168,16358,32740,65506,131040,

%T 262110,524252,1048538,2097112,4194262,8388564,16777170,33554384,

%U 67108814,134217676,268435402,536870856,1073741766,2147483588

%N Let r(n) be the real positive root of Sum_{k=1..n} x^k = 1, then a(n) = round(1/(r(n) - 1/2)).

%H G. C. Greubel, <a href="/A079460/b079460.txt">Table of n, a(n) for n = 1..1000</a>

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

%F For n >= 6, a(n) = 2^(n+2) - 2*(n+1).

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

%t LinearRecurrence[{4,-5,2},{2,8,23,53,115,242,496,1006},30] (* _Harvey P. Dale_, Dec 15 2015 *)

%o (PARI) my(x='x+O('x^30)); Vec(x*(2+x^2-3*x^3+2*x^4+x^5-3*x^6+2*x^7 )/((1-x)^2*(1-2*x))) \\ _G. C. Greubel_, Jan 18 2019

%o (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( x*(2+x^2-3*x^3+2*x^4+x^5-3*x^6+2*x^7 )/((1-x)^2*(1-2*x)) )); // _G. C. Greubel_, Jan 18 2019

%o (Sage) a=(x*(2+x^2-3*x^3+2*x^4+x^5-3*x^6+2*x^7 )/((1-x)^2*(1-2*x)) ).series(x, 30).coefficients(x, sparse=False); a[1:] # _G. C. Greubel_, Jan 18 2019

%o (GAP) a:=[242,496,1006];; for n in [4..30] do a[n]:=4*a[n-1]-5*a[n-2] +2*a[n-3]; od; Concatenation([2,8,23,53,115], a); # _G. C. Greubel_, Jan 18 2019

%K nonn,easy

%O 1,1

%A _Benoit Cloitre_, Jan 12 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 14:18 EDT 2024. Contains 371960 sequences. (Running on oeis4.)