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 A055640 #54 Oct 09 2023 07:09:22 %S A055640 0,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2, %T A055640 2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2, %U A055640 2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2 %N A055640 Number of nonzero digits in decimal expansion of n. %C A055640 Comment from _Antti Karttunen_, Sep 05 2004: (Start) %C A055640 Also number of characters needed to write the number n in classical Greek alphabetic system, up to n=999. The Greek alphabetic system assigned values to the letters as follows: %C A055640 alpha = 1, beta = 2, gamma = 3, delta = 4, epsilon = 5, digamma = 6, zeta = 7, eta = 8, theta = 9, iota = 10, kappa = 20, lambda = 30, mu = 40, nu = 50, xi = 60, omicron = 70, pi = 80, koppa = 90, rho = 100, sigma = 200, tau = 300, upsilon = 400, phi = 500, chi = 600, psi = 700, omega = 800, sampi = 900. (End) %C A055640 For partial sums see A102685. - _Hieronymus Fischer_, Jun 06 2012 %D A055640 L. Threatte, The Greek Alphabet, in The World's Writing Systems, edited by Peter T. Daniels and William Bright, Oxford Univ. Press, 1996, p. 278. %H A055640 Hieronymus Fischer, <a href="/A055640/b055640.txt">Table of n, a(n) for n = 0..10000</a> %H A055640 Unicode Consortium, <a href="http://www.unicode.org/">Unicode Home Page</a>. (Follow the link "Display Problems?" to find an appropriate information/font file to show the Greek characters correctly. Or look at the HTML source to see their names.) %F A055640 From _Hieronymus Fischer_, Jun 06 2012: (Start) %F A055640 a(n) = Sum_{j=1..m+1} (floor(n/10^j+0.9) - floor(n/10^j)), where m = floor(log_10(n)). %F A055640 a(n) = m + 1 - A055641(n). %F A055640 G.f.: (1/(1-x))*Sum_{j>=0} (x^10^j - x^(10*10^j))/(1-x^10^(j+1)). (End) %F A055640 a(n) = A055642(n) - A055641(n). %e A055640 129 is written as rho kappa theta in the old Greek system. %t A055640 Table[Count[IntegerDigits[n],_?(#>0&)],{n,0,120}] (* _Harvey P. Dale_, Mar 11 2012 *) %t A055640 Total[Most[DigitCount[#]]]&/@Range[0,120] (* _Harvey P. Dale_, Mar 19 2021 *) %o A055640 (Haskell) %o A055640 a055640 n = length $ filter (/= '0') $ show n %o A055640 -- _Reinhard Zumkeller_, May 02 2011 %o A055640 (PARI) a(n)=my(v=digits(n));sum(i=1,#v,!!v[i]) \\ _Charles R Greathouse IV_, Aug 05 2012 %Y A055640 Cf. A102669-A102685, A004719, A011540, A052382, A061745, A054899, A055641, A055642, A122840, A160093, A160094, A193238, A196563, A195564, A000120, A000788, A023416, A059015 (for base 2). %Y A055640 Differs from A098378 for the first time at position n=200 with a(200)=1, as only one nonzero Arabic digit (and only one Greek letter) is needed for two hundred, while A098378(200)=2 as two characters are needed in the Ethiopic system. %K A055640 nonn,base,easy,nice %O A055640 0,12 %A A055640 _Henry Bottomley_, Jun 06 2000