Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,23 +0,0 @@
|
|||
do -- Goldbach's comet, translation of Lua
|
||||
|
||||
local int = require( "int" ) -- RC Pluto integer library, inc. prime utilities
|
||||
|
||||
local function goldbach( n : number ) : number
|
||||
local count = 0
|
||||
for i = 1, n // 2 do
|
||||
if int.isprime( i ) and int.isprime( n - i ) then
|
||||
++ count
|
||||
end
|
||||
end
|
||||
return count
|
||||
end
|
||||
|
||||
print( "The first 100 G numbers:" )
|
||||
print( range( 100 ):map( | n | -> string.format( "%2d"..if n % 10 == 0 then "\n" else " " end
|
||||
, goldbach( 2 + n * 2 )
|
||||
)
|
||||
)
|
||||
:concat( "" )
|
||||
)
|
||||
print( $"G(1000000) = { goldbach( 1_000_000 ) }" )
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue