Cullen and Woodall numbers: Difference between revisions

Initial FutureBasic task solution added
(Cullen and Woodall numbers in various dialects BASIC (Applesoft BASIC, Chipmunk Basic, GW-BASIC and MSX Basic))
(Initial FutureBasic task solution added)
Line 543:
1 7 23 63 159 383 895 2047 4607 10239 22527 49151 106495 229375 491519 1048575 2228223 4718591 9961471 20971519
</pre>
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
local fn CullenAndWoodall( limit as long )
NSUInteger i, cullen, woodall
printf @"%13s %9s", fn StringUTF8String( @"Cullen" ), fn StringUTF8String( @"Woodall" )
for i = 1 to limit
cullen = i * ( 2^i ) + 1
woodall = i * ( 2^i ) - 1
printf @"%3lu %9lu %9lu", i, cullen, woodall
next
end fn
 
fn CullenAndWoodall( 20 )
 
HandleEvents
</syntaxhighlight>
{{output}}
<pre>
Cullen Woodall
1 3 1
2 9 7
3 25 23
4 65 63
5 161 159
6 385 383
7 897 895
8 2049 2047
9 4609 4607
10 10241 10239
11 22529 22527
12 49153 49151
13 106497 106495
14 229377 229375
15 491521 491519
16 1048577 1048575
17 2228225 2228223
18 4718593 4718591
19 9961473 9961471
20 20971521 20971519
</pre>
 
 
=={{header|Go}}==
750

edits