[go: up one dir, main page]

login
A004427
Arithmetic mean of digits of n (rounded up).
29
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 1, 1, 1, 2, 2, 2, 3, 3
OFFSET
0,3
COMMENTS
a(100)=1 is the first value that differs from the variant "... rounded to the nearest integer". - M. F. Hasler, May 10 2015
FORMULA
From Reinhard Zumkeller, May 27 2010: (Start)
a(n) = ceiling(A007953(n)/A055642(n)); a(A000040(n)) = A074462(n);
A004426(n) <= a(n) with equality for n in A061383;
a(A178361(n)) = 1; a(A178362(n)) = 2; a(A178363(n)) = 3; a(A178364(n)) = 4; a(A178365(n)) = 5; a(A178366(n)) = 6; a(A178367(n)) = 7; a(A178368(n)) = 8; a(A178369(n)) = 9. (End)
MATHEMATICA
Ceiling[Mean[IntegerDigits[#]]]&/@Range[0, 110] (* Harvey P. Dale, Aug 29 2014 *)
PROG
(PARI) A004427(n)=ceil(sum(i=1, #n=digits(n), n[i])/#n) \\ ...Vecsmall(Str(n))...-48 is a little faster. \\ M. F. Hasler, May 10 2015
KEYWORD
nonn,base
STATUS
approved