%I M3222 #47 Apr 09 2023 02:07:00
%S 4,4,4,4,4,4,5,6,4,4,4,3,5,8,8,8,8,8,8,8,7,13,14,14,14,14,15,16,14,14,
%T 7,13,14,14,14,14,15,16,14,14,7,13,14,14,14,14,15,16,14,14,7,13,14,14,
%U 14,14,15,16,14,14,7,13,14,14,14,14,15,16,14,14,7
%N Number of letters in German name of n.
%C Standard German orthography; a letter with an umlaut or ß is counted as a single letter: e.g., 30 maps to length("dreißig") = 7.
%C There are ambiguities from n=100 on, since both, "hundert" and "einhundert" are equally valid and common. The same applies for 1000 with "tausend" or "eintausend". - _M. F. Hasler_, Nov 03 2013
%C In contrast to English (A005589 vs A052360) and French (A007005 vs A167507), there are no spaces or other punctuation in German names for numbers, until 10^6 = "eine Million". - _M. F. Hasler_, Sep 20 2014
%C There also appears to be an ambiguity on whether there is an 's' in the middle of 101*10^3, "(ein)hundertein(s)tausend". - _M. F. Hasler_, Apr 08 2023
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Wikipedia, <a href="https://de.wiktionary.org/wiki/Wiktionary:Deutsch/%C3%9Cbersicht_der_Zahlen">Deutsch/Übersicht der Zahlen</a>.
%H <a href="/index/Lc#letters">Index entries for sequences related to number of letters in n</a>
%o (PARI) /* Diacritics on umlauts are omitted and ß is represented by "B" because the GP interface cannot deal with these. The version below produces "einhundert" and "eintausend"; give a 4th argument "" to s(n, 100...) after "hundert" and "tausend" to get this instead. Names for larger numbers are easily added. */
%o German(n, eins="eins")={my(s(n, p, z, e="ein")=n=divrem(n,p); if(n[2], Str(German(n[1]*p), German(n[2])), Str(German(n[1], e), z))); if(n<20, ["null", eins, "zwei", "drei", "vier", "funf", "sechs", "sieben", "acht", "neun", "zehn", "elf", "zwolf","dreizehn","vierzehn","funfzehn", "sechzehn", "siebzehn", "achtzehn", "neunzehn"][n+1], n<100 && n%10, Str(German(n%10, e, e), "und", German(n\10*10, e)), n<100, ["zwanzig", "dreiBig", "vierzig", "funfzig", "sechzig", "siebzig", "achtzig", "neunzig"][n\10-1], n<1000, s(n, 100, "hundert"), n<10^6, s(n, 1000, "tausend"), my(t=3); while(n>=10^t, t+=3); s(n, 10^t-=3, strprintf(if(n\10^t>1, " %sen ", t%2, "e %se ", "e %s "), Str(["M", "B", "Tr", "Quadr", "Quint", "Sext", "Sept", "Oct", "Non", "Dez"][t\6], "illi", ["on", "ard"][t%2+1]))))} \\ updated Mar 03 2020, Apr 08 2023
%o A007208 = n -> #German(n) \\ _M. F. Hasler_, Nov 01 2013
%Y Cf. A005589 and A052360 (English analog).
%Y Cf. A007005 and A167507 (French analog).
%K nonn,word
%O 0,1
%A _N. J. A. Sloane_.
%E Corrected by Markus Stausberg (markus(AT)polomi.de), Aug 08 2004
%E Initial term a(0) = 4 = #"null" added by _M. F. Hasler_, Nov 01 2013
|