login
A055640
Number of nonzero digits in decimal expansion of n.
42
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, 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, 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
OFFSET
0,12
COMMENTS
Comment from Antti Karttunen, Sep 05 2004: (Start)
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:
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)
For partial sums see A102685. - Hieronymus Fischer, Jun 06 2012
REFERENCES
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.
LINKS
Unicode Consortium, Unicode Home Page. (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.)
FORMULA
From Hieronymus Fischer, Jun 06 2012: (Start)
a(n) = Sum_{j=1..m+1} (floor(n/10^j+0.9) - floor(n/10^j)), where m = floor(log_10(n)).
a(n) = m + 1 - A055641(n).
G.f.: (1/(1-x))*Sum_{j>=0} (x^10^j - x^(10*10^j))/(1-x^10^(j+1)). (End)
a(n) = A055642(n) - A055641(n).
EXAMPLE
129 is written as rho kappa theta in the old Greek system.
MATHEMATICA
Table[Count[IntegerDigits[n], _?(#>0&)], {n, 0, 120}] (* Harvey P. Dale, Mar 11 2012 *)
Total[Most[DigitCount[#]]]&/@Range[0, 120] (* Harvey P. Dale, Mar 19 2021 *)
PROG
(Haskell)
a055640 n = length $ filter (/= '0') $ show n
-- Reinhard Zumkeller, May 02 2011
(PARI) a(n)=my(v=digits(n)); sum(i=1, #v, !!v[i]) \\ Charles R Greathouse IV, Aug 05 2012
CROSSREFS
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.
Sequence in context: A174835 A297036 A231072 * A098378 A160093 A259143
KEYWORD
nonn,base,easy,nice
AUTHOR
Henry Bottomley, Jun 06 2000
STATUS
approved