A001069 Log2*(n) (version 2): take log_2 of n this many times to get a number < 2.
0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1
Examples
a(n)=1, 2, 3, 4, 5, ... for n=2, 2^2, 2^2^2, 2^2^2^2, 2^2^2^2^2, ... =2, 4, 16, 65536, 2^65536, ...
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
f[n_] := Length@ NestWhileList[ Log[2, #] &, n, # >= 2 &] - 1; Array[f, 105] (* Robert G. Wilson v, Apr 19 2012 *)
Formula
From Hieronymus Fischer, Apr 08 2012: (Start)
a(n) = A010096(n)-1.
With the exponentiation definition E_{i=1..n} c(i) := c(1)^(c(2)^(c(3)^(...(c(n-1)^(c(n)))...))); E_{i=1..0} := 1; example: E_{i=1..4} 2 = 2^(2^(2^2)) = 2^16, we get:
a(E_{i=1..n} 2) = a(E_{i=1..n-1} 2) +1, for n>=1.
G.f.: g(x) = 1/(1-x)*Sum_{k >= 1} x^(E_{i=1..k} 2).
The explicit first terms of this g.f. are
g(x) = (x^2+x^4+x^16+x^65536+...)/(1-x). (End)
Comments