This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A386261 #7 Jul 20 2025 15:39:23 %S A386261 1,2,1,1,1,2,1,3,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,3,1,2,1,1,1,2,1,2,1,2, %T A386261 1,1,1,2,1,3,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,3,1,2,1,1,1,2,1,1,1,2,1,1, %U A386261 1,2,1,3,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1 %N A386261 a(n) = A001511(A001511(n)), where A001511 is the ruler function. %C A386261 The first occurrence of k = 1, 2, ... is at n = 2^(2^(k-1) - 1) = A058891(k). %C A386261 The asymptotic density of the occurrences of k = 1, 2, ... in this sequence is 2^(2^(k-1))/(2^(2^k)-1) = 2/3, 4/15, 16/255, 256/65535, 65536/4294967295, ... %H A386261 Amiram Eldar, <a href="/A386261/b386261.txt">Table of n, a(n) for n = 1..10000</a> %F A386261 a(n) >= 1, with equality if and only if n is in A003159. %F A386261 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{m>=0} 1/(2^(2^m) - 1) = 1.4039368... (A048649). %t A386261 f[n_] := IntegerExponent[n, 2] + 1; a[n_] := f[f[n]]; Array[a, 100] %o A386261 (PARI) a(n) = valuation(valuation(n, 2) + 1, 2) + 1; %Y A386261 Cf. A001511, A003159, A048649, A058891. %Y A386261 Similar sequences: A010553, A010554, A051027, A055033, A058699, A068346, A132090, A178601, A181776, A284908, A386262. %K A386261 nonn,easy %O A386261 1,2 %A A386261 _Amiram Eldar_, Jul 17 2025