Factorions: Difference between revisions

Added 11l
(Fix Python solution for correct output)
(Added 11l)
Line 29:
:* '''[[OEIS:A193163|OEIS:A193163 - Factorions in base n]]'''
<br><br>
 
=={{header|11l}}==
{{trans|Python}}
 
<lang 11l>V fact = [1]
L(n) 1..11
fact.append(fact[n-1] * n)
 
L(b) 9..12
print(‘The factorions for base ’b‘ are:’)
L(i) 1..1'499'999
V fact_sum = 0
V j = i
L j > 0
V d = j % b
fact_sum += fact[d]
j I/= b
I fact_sum == i
print(i, end' ‘ ’)
print("\n")</lang>
 
{{out}}
<pre>
The factorions for base 9 are:
1 2 41282
 
The factorions for base 10 are:
1 2 145 40585
 
The factorions for base 11 are:
1 2 26 48 40472
 
The factorions for base 12 are:
1 2
 
</pre>
 
=={{header|360 Assembly}}==
Line 99 ⟶ 135:
Base 12 : 1 2
</pre>
 
 
=={{header|ALGOL 68}}==
1,481

edits