A097569 Right-truncatable Harshad numbers (zeros not permitted).
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 18, 21, 24, 27, 36, 42, 45, 48, 54, 63, 72, 81, 84, 126, 216, 243, 247, 364, 423, 481, 486, 846, 2478, 8463, 24786
Offset: 1
Crossrefs
Cf. A005349.
Programs
-
Mathematica
harQ[n_]:=Module[{idn=IntegerDigits[n]},!MemberQ[idn,0]&&Divisible[n, Total[ idn]]]; rtQ[n_]:=Module[{idn=IntegerDigits[n],c}, c=Table[ FromDigits[ Take[ idn,i]],{i,Length[idn]}];And@@(harQ/@c)]; Select[ Range[25000],rtQ] (* Harvey P. Dale, Oct 07 2013 *)
Comments