A371462 Numbers such that the arithmetic mean of its digits is equal to the population standard deviation of its digits.
0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 1001, 1010, 1014, 1041, 1049, 1094, 1100, 1104, 1140, 1401, 1409, 1410, 1490, 1904, 1940, 2002, 2020, 2028, 2082, 2200, 2208, 2280, 2802, 2820, 3003, 3030, 3300, 4004, 4011, 4019, 4040, 4091, 4101, 4109, 4110, 4190, 4400, 4901, 4910
Offset: 1
Examples
1014 is a term since the mean of the digits is (1 + 0 + 1 + 4)/4 = 3/2 and the standard deviation of the digits is sqrt(((1-3/2)^2 + (0-3/2)^2 + (1-3/2)^2 + (4-3/2)^2)/4) = sqrt((1/4 + 9/4 + 1/4 + 25/4)/4) = sqrt(9/4) = 3/2.
Links
- Wikipedia, Coefficient of variation.
- Wikipedia, Standard deviation.
Programs
-
Maple
filter:= proc(x) local F,n,mu,i; F:= convert(x,base,10); n:= nops(F); mu:= convert(F,`+`)/n; evalb(2*mu^2 = add(F[i]^2,i=1..n)/n) end proc: select(filter, [$0..10000]); # Robert Israel, Mar 24 2024
-
Mathematica
DigStd[n_]:=If[n==0||IntegerLength[n]==1, 0, Sqrt[(IntegerLength[n]-1)/IntegerLength[n]]StandardDeviation[IntegerDigits[n]]]; Select[Range[0, 5000], Mean[IntegerDigits[#]]==DigStd[#]&]
-
Python
from itertools import count, islice def A371462_gen(startvalue=0): # generator of terms >= startvalue return filter(lambda n:sum(map(int,(s:=str(n))))**2<<1 == len(s)*sum(int(d)**2 for d in s), count(max(startvalue,0))) A371462_list = list(islice(A371462_gen(),20)) # Chai Wah Wu, Mar 28 2024
Comments