cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A371462 Numbers such that the arithmetic mean of its digits is equal to the population standard deviation of its digits.

This page as a plain text file.
%I A371462 #21 Mar 31 2024 04:39:20
%S A371462 0,10,20,30,40,50,60,70,80,90,1001,1010,1014,1041,1049,1094,1100,1104,
%T A371462 1140,1401,1409,1410,1490,1904,1940,2002,2020,2028,2082,2200,2208,
%U A371462 2280,2802,2820,3003,3030,3300,4004,4011,4019,4040,4091,4101,4109,4110,4190,4400,4901,4910
%N A371462 Numbers such that the arithmetic mean of its digits is equal to the population standard deviation of its digits.
%C A371462 Equivalently, numbers whose digits have the coefficient of variation (or relative population standard deviation) equal to 1.
%C A371462 Any number obtained without leading zeros from a permutation of the digits of a given term of the sequence is also a term.
%C A371462 The concatenation of several copies of any term is a term. - _Robert Israel_, Mar 24 2024
%H A371462 Wikipedia, <a href="https://en.wikipedia.org/wiki/Coefficient_of_variation">Coefficient of variation</a>.
%H A371462 Wikipedia, <a href="https://en.wikipedia.org/wiki/Standard_deviation">Standard deviation</a>.
%e A371462 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.
%p A371462 filter:= proc(x) local F,n,mu,i;
%p A371462   F:= convert(x,base,10);
%p A371462   n:= nops(F);
%p A371462   mu:= convert(F,`+`)/n;
%p A371462   evalb(2*mu^2 = add(F[i]^2,i=1..n)/n)
%p A371462 end proc:
%p A371462 select(filter, [$0..10000]); # _Robert Israel_, Mar 24 2024
%t A371462 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[#]&]
%o A371462 (Python)
%o A371462 from itertools import count, islice
%o A371462 def A371462_gen(startvalue=0): # generator of terms >= startvalue
%o A371462     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)))
%o A371462 A371462_list = list(islice(A371462_gen(),20)) # _Chai Wah Wu_, Mar 28 2024
%Y A371462 Cf. A371383, A371384, A371463, A371464.
%Y A371462 Cf. A238619, A238620, A238658, A238660, A238662.
%K A371462 nonn,base
%O A371462 1,2
%A A371462 _Stefano Spezia_, Mar 24 2024