login
a(n) is the closest number to 2^n which is divisible by n.
8

%I #18 Aug 08 2017 05:34:30

%S 2,4,9,16,30,66,126,256,513,1020,2046,4092,8190,16380,32775,65536,

%T 131070,262152,524286,1048580,2097144,4194300,8388606,16777224,

%U 33554425,67108860,134217729,268435468,536870910,1073741820,2147483646

%N a(n) is the closest number to 2^n which is divisible by n.

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

%F a(n) = n*floor( (floor(n/2)+2^n) / n ).

%e n=11: 2^11=2048 is between 2046=11.186 and 2035=11.185, closer to a(11)=2046;

%e Powers of two are fixed points of this map.

%p A082894:=n->n*floor((floor(n/2)+2^n)/n); seq(A082894(k), k=1..100); # _Wesley Ivan Hurt_, Oct 29 2013

%t Table[n*Floor[(Floor[n/2]+2^n)/n], {n, 100}]

%o (PARI) for(n=1,50, print1(n*floor( (floor(n/2)+2^n) / n ), ", ")) \\ _G. C. Greubel_, Aug 08 2017

%Y Cf. A082893, A082895, A082896, A082897, A082898, A082899, A082900.

%K nonn

%O 1,1

%A _Labos Elemer_, Apr 22 2003