A103354 a(n) = floor(x), where x is the solution to x = 2^(n-x).
1, 1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 64, 65, 66, 67
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- J.-P. Allouche, J. Shallit, On the subword complexity of the fixed point of a -> aab, b -> b, and generalizations, arXiv preprint arXiv:1605.02361 [math.CO], 2016.
Programs
-
Maple
A[1]:= 1; for n from 2 to 100 do for x from A[n-1] while x <= 2^(n-x) do od; A[n]:= x-1; od: seq(A[i],i=1..100); # Robert Israel, Dec 04 2016
-
Mathematica
a[n_] := Floor[ FullSimplify[ ProductLog[ 2^n*Log[2]]/Log[2]]]; Table[a[n], {n, 1, 74}] (* Jean-François Alcover, Dec 13 2011, after M. F. Hasler *)
-
PARI
A103354(n)=floor(solve(X=1,log(n)*2,X-2^(n-X))+1e-9) \\ M. F. Hasler, Dec 14 2007
-
PARI
A103354(n)=floor(n-log(n)/log(2)*(1-1.5/n)) \\ M. F. Hasler, Dec 14 2007
Formula
a(n) is approximately n/(1+log_2(n)/n).
a(n) = floor(LambertW(log(2)*2^n)/log(2)) = floor(n - log_2(n) + log_2(n)/(n log(2)) + O((log(n)/n)^2)) = floor(n - log_2(n) + 1.5*log_2(n)/n) at least for all n < 10^7. - M. F. Hasler, Dec 14 2007
Extensions
Edited by M. F. Hasler, Dec 14 2007
Comments