A160818 Each number is the average of the numbers formed by all the possible permutations of the digits of that number.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 111, 222, 333, 370, 407, 444, 481, 518, 555, 592, 629, 666, 777, 888, 999, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 11111, 22222, 33333, 44444, 55555, 66666, 77777, 88888, 99999, 111111
Offset: 1
Examples
a(22) = 370 is a member because 073+037+307+370+703+730 = 2220, average = 2220/6 = 370
Links
- H. v. Eitzen, Table of n, a(n) for n=1..1002
- Robert Munafo, Equal to Average of Permutations of its Digits [From _Robert Munafo_, Jun 18 2009]
Programs
-
C
See Robert Munafo link
-
Maple
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
-
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
Extensions
15 more terms from R. J. Mathar, May 29 2009
More terms from Robert Munafo, Jun 18 2009
Comments