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!)
A191296 Least k such that k-1 and k+1 in binary representation have same number n of 0's as 1's. 2

%I #27 Jan 26 2018 13:10:45

%S 11,36,140,540,2108,8316,33020,131580,525308,2099196,8392700,33562620,

%T 134234108,536903676,2147549180,8590065660,34360000508,137439477756,

%U 549756862460,2199025352700,8796097216508,35184380477436,140737505132540,562949986975740,2251799880794108,9007199388958716,36028797287399420

%N Least k such that k-1 and k+1 in binary representation have same number n of 0's as 1's.

%H Colin Barker, <a href="/A191296/b191296.txt">Table of n, a(n) for n = 2..1000</a>

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

%F a(n) = 2*(2^(n-1) + 2)*(2^(n-1) - 1) for n>=3. - _Nathaniel Johnston_, May 30 2011

%F a(0)=11, a(1)=36, a(2)=140, a(3)=540, a(n)=7*a(n-1)-14*a(n-2)+8*a(n-3). - _Harvey P. Dale_, Jun 10 2011

%F G.f.: x^2*(11 - 41*x + 42*x^2 - 24*x^3) / ((1 - x)*(1 - 2*x)*(1 - 4*x)). - _Colin Barker_, Jan 26 2018

%t Join[{11},LinearRecurrence[{7,-14,8},{36,140,540},40]] (* _Harvey P. Dale_, Jun 10 2011 *)

%o (PARI) a(n)=if(n<3,11,2*(2^(n-1) + 2)*(2^(n-1) - 1)) \\ _Charles R Greathouse IV_, Jun 01 2011

%o (PARI) Vec(x^2*(11 - 41*x + 42*x^2 - 24*x^3) / ((1 - x)*(1 - 2*x)*(1 - 4*x)) + O(x^40)) \\ _Colin Barker_, Jan 26 2018

%Y Cf. A031443 (digitally balanced numbers), A191292, A191341.

%K nonn,easy,base

%O 2,1

%A _Juri-Stepan Gerasimov_, May 29 2011

%E a(11)-a(27) and recurrence from _Charles R Greathouse IV_, May 29 2011

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 May 11 07:00 EDT 2024. Contains 372388 sequences. (Running on oeis4.)