|
|
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
|
|
|
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:
|
|
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
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|