login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257295 Arithmetic mean of the digits of n, rounded to the nearest integer. 2
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, 0, 1, 1, 1, 2, 2, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Coincides up to a(99) with the variant A004427 (= arithmetic mean of digits, rounded up). - M. F. Hasler, May 10 2015

0 <= a(n) <= 9.  a(10*n + a(n)) = a(n). - Robert Israel, May 11 2015

LINKS

Table of n, a(n) for n=0..107.

Index entries for Colombian or self numbers and related sequences

FORMULA

a(n) = round(A007953(n)/A055642(n)).

A004426(n) <= a(n) <= A004427(n).

MAPLE

f:= proc(n) local L;

   L:= convert(n, base, 10);

   round(convert(L, `+`)/nops(L))

end proc:

map(f, [$0..100]); # Robert Israel, May 11 2015

MATHEMATICA

Round[Mean[IntegerDigits[#]]]&/@Range[0, 110]

PROG

(PARI) A257295(n)=round(sum(i=1, #n=digits(n), n[i])/#n) \\ ...Vecsmall(Str(n))...-48 is a little faster.

(PARI) a(n)=round(sumdigits(n)/#digits(n)) \\ Charles R Greathouse IV, May 11 2015

CROSSREFS

Cf. A004426, A004427, A007953, A055642, A004428, A004429.

Sequence in context: A174210 A134777 A253015 * A004427 A113230 A065881

Adjacent sequences:  A257292 A257293 A257294 * A257296 A257297 A257298

KEYWORD

nonn,base,easy

AUTHOR

M. F. Hasler, May 10 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 23 18:13 EST 2019. Contains 320437 sequences. (Running on oeis4.)