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!)
A176303 a(n) = abs(2^n-127). 5

%I #21 Feb 11 2024 12:01:10

%S 126,125,123,119,111,95,63,1,129,385,897,1921,3969,8065,16257,32641,

%T 65409,130945,262017,524161,1048449,2097025,4194177,8388481,16777089,

%U 33554305,67108737,134217601,268435329,536870785,1073741697,2147483521,4294967169

%N a(n) = abs(2^n-127).

%D R. K. Guy, Unsolved problems in number theory, Vol.1, 1994, Springer-Verlag,pages 42-43.

%H Indranil Ghosh, <a href="/A176303/b176303.txt">Table of n, a(n) for n = 0..1000</a>

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

%F From _Colin Barker_, Feb 20 2017: (Start)

%F a(n) = 2^n - 127 for n>6.

%F a(n) = 3*a(n-1) - 2*a(n-2) for n>8.

%F G.f.: (126 - 253*x + 2*x^7 + 252*x^8) / ((1 - x)*(1 - 2*x)).

%F (End)

%e a(2) = abs(2^2-127) = abs(4-127) = abs(-123) = 123. - _Indranil Ghosh_, Feb 20 2017

%t Table[Abs[2^n-127],{n,0,32}] (* or *) CoefficientList[Series[(126 - 253*x + 2*x^7 + 252*x^8) / ((1 - x)*(1 - 2*x)) ,{x,0,30}],x] (* _Indranil Ghosh_, Feb 20 2017 *)

%t LinearRecurrence[{3,-2},{126,125,123,119,111,95,63,1,129},40] (* _Harvey P. Dale_, Feb 11 2024 *)

%o (Python) def A176303(n): return abs(2**n-127) # _Indranil Ghosh_, Feb 20 2017

%o (PARI) Vec((126 - 253*x + 2*x^7 + 252*x^8) / ((1 - x)*(1 - 2*x)) + O(x^40)) \\ _Colin Barker_, Feb 20 2017

%o (PARI) a(n)=abs(2^n-127) \\ _Charles R Greathouse IV_, Feb 20 2017

%Y See A175347, A169716 for primes.

%K nonn,easy

%O 0,1

%A _Vladimir Shevelev_, Apr 14 2010

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 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)