A225782 Numbers such that every permutation of digits of n is divisible by sum of digits of n.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42, 45, 48, 50, 54, 60, 63, 70, 72, 80, 81, 84, 90, 100, 102, 108, 111, 117, 120, 126, 135, 144, 153, 162, 171, 180, 200, 201, 204, 207, 210, 216, 222, 225, 234, 240, 243, 252, 261, 270, 288
Offset: 1
Examples
126 is a member since 126, 162, 216, 261, 612 and 621 are all divisible by (1+2+6)=9. 209 is not a member since 29 is not divisible by (2+9)=11.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
filter:= proc(n) local s,L; L:= convert(n,base,10); s:= convert(L,`+`); n mod s = 0 and nops({seq(9*d mod s, d = L)}) = 1 end proc: select(filter, [$1..1000]); # Robert Israel, May 11 2017
-
Mathematica
d[n_]:=IntegerDigits[n]; sod[n_]:=Total[d[n]]; t={}; Do[t1=Table[FromDigits[k],{k,Permutations[d[n]]}]; If[Select[t1,Mod[#,sod[n]]!=0 &]=={},AppendTo[t,n]],{n,288}]; t
Comments