OFFSET
1,2
COMMENTS
Harshad numbers in which repeatedly deleting the rightmost digit gives a Harshad number at every step until a single-digit Harshad number remains. Sequence is finite with 24786 being the last term.
24786 can be proved to be the last term by a genetic approach (constructing the whole tree). - Carlos Rivera, Sep 19 2004
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 *)
CROSSREFS
KEYWORD
base,nonn,fini,full
AUTHOR
Jason Earls, Aug 28 2004
STATUS
approved