|
|
A128290
|
|
If p(x) is the product of the digits of the number x and s(x) the sum of the digits then the sequence lists all the numbers n for which p[s(n)]=s[p(n)], with n>=1.
|
|
1
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 36, 63, 109, 123, 132, 158, 185, 190, 199, 208, 213, 231, 280, 289, 298, 307, 312, 321, 333, 370, 406, 458, 460, 469, 485, 496, 505, 518, 548, 550, 556, 559, 565, 581, 584, 595, 604, 640, 649, 655, 667, 676, 694, 703, 730, 766, 802
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
496 -> s(496)=4+9+6=19; p[s(496)]=1*9=9 and p(496)=4*9*6=216; s[p(496)]=2+1+6=9.
845 -> s(845)=8+4+5=17; p[s(845)]=1*7=7 and p(845)=8*4*5=160; s[p(845)]=1+6+0=7.
|
|
MAPLE
|
P:=proc(n) local i, k, w, sp; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; k:=w; w:=1; while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; sp:=w; w:=1; k:=i; while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; k:=w; w:=0; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; if sp=w then print(i); fi; od; end: P(1000);
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|