login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A055640 Number of nonzero digits in decimal expansion of n. 42

%I #54 Oct 09 2023 07:09:22

%S 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 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 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 Number of nonzero digits in decimal expansion of n.

%C Comment from _Antti Karttunen_, Sep 05 2004: (Start)

%C 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 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 For partial sums see A102685. - _Hieronymus Fischer_, Jun 06 2012

%D 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 Hieronymus Fischer, <a href="/A055640/b055640.txt">Table of n, a(n) for n = 0..10000</a>

%H 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 From _Hieronymus Fischer_, Jun 06 2012: (Start)

%F a(n) = Sum_{j=1..m+1} (floor(n/10^j+0.9) - floor(n/10^j)), where m = floor(log_10(n)).

%F a(n) = m + 1 - A055641(n).

%F G.f.: (1/(1-x))*Sum_{j>=0} (x^10^j - x^(10*10^j))/(1-x^10^(j+1)). (End)

%F a(n) = A055642(n) - A055641(n).

%e 129 is written as rho kappa theta in the old Greek system.

%t Table[Count[IntegerDigits[n],_?(#>0&)],{n,0,120}] (* _Harvey P. Dale_, Mar 11 2012 *)

%t Total[Most[DigitCount[#]]]&/@Range[0,120] (* _Harvey P. Dale_, Mar 19 2021 *)

%o (Haskell)

%o a055640 n = length $ filter (/= '0') $ show n

%o -- _Reinhard Zumkeller_, May 02 2011

%o (PARI) a(n)=my(v=digits(n));sum(i=1,#v,!!v[i]) \\ _Charles R Greathouse IV_, Aug 05 2012

%Y Cf. A102669-A102685, A004719, A011540, A052382, A061745, A054899, A055641, A055642, A122840, A160093, A160094, A193238, A196563, A195564, A000120, A000788, A023416, A059015 (for base 2).

%Y 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 nonn,base,easy,nice

%O 0,12

%A _Henry Bottomley_, Jun 06 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)