%I #20 May 11 2015 18:45:28
%S 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,
%T 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,
%U 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,0,1,1,1,2,2,2,3
%N Arithmetic mean of the digits of n, rounded to the nearest integer.
%C Coincides up to a(99) with the variant A004427 (= arithmetic mean of digits, rounded up). - _M. F. Hasler_, May 10 2015
%C 0 <= a(n) <= 9. a(10*n + a(n)) = a(n). - _Robert Israel_, May 11 2015
%H <a href="/index/Coi#Colombian">Index entries for Colombian or self numbers and related sequences</a>
%F a(n) = round(A007953(n)/A055642(n)).
%F A004426(n) <= a(n) <= A004427(n).
%p f:= proc(n) local L;
%p L:= convert(n,base,10);
%p round(convert(L,`+`)/nops(L))
%p end proc:
%p map(f, [$0..100]); # _Robert Israel_, May 11 2015
%t Round[Mean[IntegerDigits[#]]]&/@Range[0,110]
%o (PARI) A257295(n)=round(sum(i=1, #n=digits(n), n[i])/#n) \\ ...Vecsmall(Str(n))...-48 is a little faster.
%o (PARI) a(n)=round(sumdigits(n)/#digits(n)) \\ _Charles R Greathouse IV_, May 11 2015
%Y Cf. A004426, A004427, A007953, A055642, A004428, A004429.
%K nonn,base,easy
%O 0,3
%A _M. F. Hasler_, May 10 2015
|