%I #26 Mar 11 2021 20:44:11
%S 1,2,3,4,5,6,7,8,9,12,24,36,48,111,112,126,132,135,144,162,216,222,
%T 224,264,288,312,315,324,333,336,396,432,444,448,555,612,624,648,666,
%U 735,777,864,888,936,999,1116,1122,1128,1164,1212,1224,1236,1296,1332
%N Numbers divisible both by their individual digits and by the sum of their digits.
%C No zero digits permitted. [_Harvey P. Dale_, Dec 18 2011]
%H Reinhard Zumkeller, <a href="/A051004/b051004.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Digit.html">Digit</a>
%t ddQ[n_]:=Module[{idn=IntegerDigits[n]},!MemberQ[idn,0] && Divisible[ n,Total[idn]]&&And@@Divisible[n,idn]]; Select[Range[1400],ddQ] (* _Harvey P. Dale_, Dec 18 2011 *)
%o (Haskell)
%o a051004 n = a051004_list !! (n-1)
%o a051004_list = [x | x <- a005349_list,
%o x == head (dropWhile (< x) a034838_list)]
%o -- _Reinhard Zumkeller_, Mar 03 2012
%Y Intersection of A005349 and A034838.
%Y Cf. A038369, A087142.
%K nonn,nice,base
%O 1,2
%A _Eric W. Weisstein_
%E Offset corrected by _Reinhard Zumkeller_, Mar 03 2012
|