A173577
7-Factorions: equal to the sum of the 7-fold factorials of their digits in base 10.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 8, 19
Offset: 1
19 -> 1!!!!!!! + 9!!!!!!! = 1 + 9*2 = 1 + 18 = 19.
-
P:=proc(n,m) local a,b,i,j,k,x,w; for i from 1 by 1 to n do a:=0; b:=0; w:=0; k:=i; while k>0 do w:=k-(trunc(k/10)*10); j:=w; x:=w-m; if w=0 then b:=1; else while x>0 do j:=j*x; x:=x-m; od; b:=j; fi; a:=a+b; k:=trunc(k/10); od; if a=i then lprint(i,a); fi; od; end: P(1000,7);
A173574
4-Factorions: equal to the sum of the quadruple factorials of their digits in base 10.
Original entry on oeis.org
1, 2, 3, 4, 5, 49
Offset: 1
49 -> 4!!!! + 9!!!! = 4 + 9*5 = 4 +45 = 49.
-
P:=proc(n,m) local a,b,i,j,k,x,w; for i from 1 by 1 to n do a:=0; b:=0; w:=0; k:=i; while k>0 do w:=k-(trunc(k/10)*10); j:=w; x:=w-m; if w=0 then b:=1; else while x>0 do j:=j*x; x:=x-m; od; b:=j; fi; a:=a+b; k:=trunc(k/10); od; if a=i then lprint(i,a); fi; od; end: P(1000,4);
-
qfd[n_]:=Times@@Range[n,1,-4]; Select[Range[50],Total[qfd/@ IntegerDigits[ #]] == #&] (* Harvey P. Dale, Dec 15 2018 *)
A173575
5-Factorions: equal to the sum of the quintuple factorials of their digits in base 10.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 39
Offset: 1
39 -> 3!!!!! + 9!!!!! = 3 + 9*4 = 3 + 36 = 39.
-
P:=proc(n,m) local a,b,i,j,k,x,w; for i from 1 by 1 to n do a:=0; b:=0; w:=0; k:=i; while k>0 do w:=k-(trunc(k/10)*10); j:=w; x:=w-m; if w=0 then b:=1; else while x>0 do j:=j*x; x:=x-m; od; b:=j; fi; a:=a+b; k:=trunc(k/10); od; if a=i then lprint(i,a); fi; od; end: P(1000,5);
A173576
6-Factorions: equal to the sum of the 6-ple factorials of their digits in base 10.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 29
Offset: 1
29 -> 2!!!!!! + 9!!!!!! = 2 + 9*3 = 2 + 27 = 29.
-
P:=proc(n,m) local a,b,i,j,k,x,w; for i from 1 by 1 to n do a:=0; b:=0; w:=0; k:=i; while k>0 do w:=k-(trunc(k/10)*10); j:=w; x:=w-m; if w=0 then b:=1; else while x>0 do j:=j*x; x:=x-m; od; b:=j; fi; a:=a+b; k:=trunc(k/10); od; if a=i then lprint(i,a); fi; od; end: P(1000,6);
Showing 1-4 of 4 results.