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 A004216 #45 Jul 02 2025 16:01:54 %S A004216 0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, %T A004216 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, %U A004216 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2 %N A004216 a(n) = floor(log_10(n)). %H A004216 Reinhard Zumkeller, <a href="/A004216/b004216.txt">Table of n, a(n) for n = 1..10000</a> %F A004216 a(n) = if n > 9 then a(floor(n/10)) + 1, else 0. - _Reinhard Zumkeller_, Oct 31 2001 %F A004216 a(n) = A055642(n) - 1. - _L. Edson Jeffery_, Jul 09 2014 %F A004216 G.f.: (1/(1 - x))*Sum_{k>=1} x^(10^k). - _Ilya Gutkovskiy_, Jan 08 2017 %t A004216 Table[ Length[ IntegerDigits[n, 10] ] - 1, {n, 105}] (* _Jean-François Alcover_, Jun 10 2013 *) %t A004216 Table[Floor[Log10[n]], {n, 105}] (* _L. Edson Jeffery_, Jul 09 2014 *) %o A004216 (Haskell) %o A004216 a004216 n = if n <= 9 then 0 else 1 + a004216 (n `div` 10) %o A004216 -- _Reinhard Zumkeller_, Dec 22 2012 %o A004216 (PARI) a(n) = logint(n, 10); \\ _Michel Marcus_, Oct 16 2021 %o A004216 (Python) %o A004216 def A004216(n): return len(str(n))-1 # _Chai Wah Wu_, May 02 2023 %Y A004216 Cf. A055642. %K A004216 nonn,easy %O A004216 1,100 %A A004216 _N. J. A. Sloane_ %E A004216 More terms from _James Sellers_, Sep 19 2000