OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
Positive integers n such that A195860(n) = 8.
EXAMPLE
126^1 = 126 -> Sum_digits(126) = 9, and 126 is a multiple of 9
126^2 = 15876 -> Sum_digits(15876) = 27, and 15876 is a multiple of 27
126^3 = 2000376 -> Sum_digits(2000376) = 18, and 2000376 is a multiple of 18
126^4 = 252047376 -> Sum_digits(252047376) = 36, and 252047376 is a multiple of 36
126^5 = 31757969376 -> Sum_digits(31757969376) = 63, and 31757969376is a multiple of 63
126^6 = 4001504141376 -> Sum_digits(4001504141376) = 36, and 4001504141376 is a multiple of 36
126^7 = 504189521813376 -> Sum_digits(504189521813376) = 63, and 504189521813376 is a multiple of 63
126^8 = 63527879748485376 -> Sum_digits(63527879748485376) = 99, and 63527879748485376 is not a multiple of 99
MAPLE
readlib(log10); P:=proc(n, m) local a, i, k, w, x, ok; for i from 1 by 1 to n do a:=simplify(log10(i)); if not (trunc(a)=a) then ok:=1; x:=1; while ok=1 do w:=0; k:=i^x; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; if trunc(i^x/w)=i^x/w then x:=x+1; else if x-1=m then print(i); fi; ok:=0; fi; od; fi; od; end: P(2000, 7);
MATHEMATICA
msdQ[n_]:=AllTrue[n^Range[7], Divisible[#, Total[IntegerDigits[#]]]&] && !Divisible[n^8, Total[IntegerDigits[n^8]]]; Select[Range[12000], msdQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 01 2017 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava & Giorgio Balzarotti, Nov 22 2007
EXTENSIONS
More terms from Max Alekseyev, Sep 24 2011
STATUS
approved