[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257296 Arithmetic mean of the digits of n, multiplied by 10^(d-1) and rounded down, where d is the number of digits of n. 1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 30, 35, 40, 45, 50, 55, 60, 65 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The reason for the factor 10^(d-1) in the definition is to produce an analog of A257294, i.e., give the first d digits of the mean value, for an "average" d-digit number. But since the arithmetic mean of the digits may be between 0 and 1, the situation is slightly different from the case of the geometric mean.
Also motivated by sequence A257829.
LINKS
FORMULA
a(n) = floor(A007953(n)/A055642(n)*10^(A055642(n)-1))
EXAMPLE
For n = 12, a two-digit number, the average of the digits is 1.50000..., so a(12) = 15.
MAPLE
f:= proc(n) local d;
d:= ilog10(n);
floor(convert(convert(n, base, 10), `+`)/(d+1)*10^d)
end proc:
map(f, [$0..100]); # Robert Israel, May 10 2015
MATHEMATICA
Table[Floor[Mean[IntegerDigits[n]]10^(IntegerLength[n]-1)], {n, 0, 70}] (* Harvey P. Dale, Mar 11 2020 *)
PROG
(PARI) a(n)=sum(i=1, #n=digits(n), n[i])*10^(#n-1)\#n
CROSSREFS
Sequence in context: A081596 A061500 A051796 * A093030 A122425 A360073
KEYWORD
nonn,base,easy,look
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 28 23:11 EDT 2024. Contains 375508 sequences. (Running on oeis4.)