Sequence: smallest number greater than previous term with exactly n divisors: Difference between revisions

m
(Added various BASIC dialects (BASIC256, Gambas, PureBasic, QBasic, Run BASIC, XBasic and Yabasic))
m (→‎{{header|Wren}}: Minor tidy)
 
(One intermediate revision by one other user not shown)
Line 724:
<pre>The first 15 terms of the sequence are:
1 2 4 6 16 18 64 66 100 112 1024 1035 4096 4288 4624</pre>
 
=={{header|EasyLang}}==
{{trans|AWK}}
<syntaxhighlight>
func ndivs n .
i = 1
while i <= sqrt n
if n mod i = 0
cnt += 2
if i = n div i
cnt -= 1
.
.
i += 1
.
return cnt
.
n = 1
while n <= 15
i += 1
if n = ndivs i
write i & " "
n += 1
.
.
</syntaxhighlight>
 
=={{header|F_Sharp|F#}}==
Line 738 ⟶ 764:
1 2 4 6 16 18 64 66 100 112 1024 1035 4096 4288 4624 4632 65536 65572 262144 262192 263169 269312 4194304 4194306 4477456 4493312 4498641 4498752
</pre>
 
=={{header|Factor}}==
<syntaxhighlight lang="factor">USING: io kernel math math.primes.factors prettyprint sequences ;
Line 1,861 ⟶ 1,888:
{{trans|Phix}}
{{libheader|Wren-math}}
<syntaxhighlight lang="ecmascriptwren">import "./math" for Int
 
var limit = 24
9,476

edits