Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #19 Jun 08 2021 14:57:26
%S 1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99,111,222,333,370,407,444,
%T 481,518,555,592,629,666,777,888,999,1111,2222,3333,4444,5555,6666,
%U 7777,8888,9999,11111,22222,33333,44444,55555,66666,77777,88888,99999,111111
%N Each number is the average of the numbers formed by all the possible permutations of the digits of that number.
%C A number n with k digits and digit sum s occurs in the sequence if and only if (10^k-1)*s = 9*k*n. - _Hagen von Eitzen_, Jun 17 2009
%C Many terms (perhaps all) are related to decimal expansions of fractions with a power of 3 in the denominator (see Munafo webpage). - _Robert Munafo_, Jun 18 2009
%C Replacing "all possible permutations" in the definition with "all cyclic permutations" produces the same sequence. Even more generally, the symmetric group can be replaced by any finite group operating transitively on the n places. - _Hagen von Eitzen_, Jun 22 2009
%H H. v. Eitzen, <a href="/A160818/b160818.txt">Table of n, a(n) for n=1..1002</a>
%H Robert Munafo, <a href="http://mrob.com/pub/seq/a160818.html">Equal to Average of Permutations of its Digits</a> [From _Robert Munafo_, Jun 18 2009]
%e a(22) = 370 is a member because 073+037+307+370+703+730 = 2220, average = 2220/6 = 370
%p Lton := proc(L) add( op(i,L)*10^(i-1),i=1..nops(L)) ; end: isA160818 := proc(n) local dgs,av ; dgs := combinat[permute]( convert(n,base,10) ); av := add( Lton(p),p=dgs)/nops(dgs) ; RETURN(av=n) ; end: for n from 1 to 40000 do if isA160818(n) then printf("%d,",n) ; fi; od: # _R. J. Mathar_, May 29 2009
%o (C) See Robert Munafo link
%o (PARI) for(k=1, 20, rep=(10^k-1)/9; for(s=1, 9*k, if((rep*s)%k==0 && A007953(n=rep*s/k)==s, print1(n, ", ")))) \\ _Hagen von Eitzen_, Jun 22 2009
%K nonn,base
%O 1,2
%A _Claudio Meller_, May 27 2009
%E 15 more terms from _R. J. Mathar_, May 29 2009
%E More terms from _Robert Munafo_, Jun 18 2009