login
A128870
Numbers n that are divisible by d, where a_i for 1 <= i <= k are the digits of n and d = Product_{i=1..k}Sum_of_digits_of_(a_i^k).
0
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 111, 112, 128, 216, 512, 1111, 1116, 1127, 1211, 1274, 5187, 8151, 11111, 15125, 41111, 111111, 111188, 111511, 141151, 1111111, 1111121, 1112111, 1211111, 11111111, 11111175, 11211291, 71111117, 111111111
OFFSET
1,2
COMMENTS
Sequence is infinite since it contains all repunits > 0; are there infinitely many other terms?
EXAMPLE
5, 1, 8, 7 are the four digits of 5187. 5^4 = 625 and 6+2+5 = 13; 1^4 = 1; 8^4 = 4096 and 4+0+9+6 = 19; 7^4 = 2401 and 2+4+0+1 = 7. Since 13*1*19*7 = 1729 divides 5187 = 1729*3, 5187 is in the sequence.
MAPLE
P:=proc(n) local i, j, k, w, y, prod, cont; for i from 1 by 1 to n do w:=0; k:=i; cont:=0; while k>0 do k:=trunc(k/10); cont:=cont+1; od; k:=i; prod:=1; for j from 1 to cont do w:=(k-(trunc(k/10)*10))^cont; y:=0; while w>0 do y:=y+w-(trunc(w/10)*10); w:=trunc(w/10); od; prod:=prod*y; k:=trunc(k/10); od; if prod>0 then if trunc(i/prod)=i/prod then print(i); fi; fi; od; end: P(200000);
MATHEMATICA
nddQ[n_]:=Module[{c=Times@@(Total[IntegerDigits[#]]&/@(IntegerDigits[ n]^ IntegerLength[n]))}, c!=0&&Divisible[n, c]]; Select[Range[111111111], nddQ] (* Harvey P. Dale, Jun 05 2016 *)
PROG
(Magma) [ n: n in [1..112000000] | p gt 0 and n mod p eq 0 where p is &*[ &+Intseq(x^#k, 10): x in k ] where k is Intseq(n, 10) ]; // Klaus Brockhaus, Apr 25 2007
CROSSREFS
Cf. A002275 (repunits), A005188 (Armstrong numbers).
Sequence in context: A252495 A182175 A254329 * A355620 A256476 A154771
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Edited and a(36) to a(40) added by Klaus Brockhaus, Apr 25 2007
STATUS
approved