Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Goldbachs-comet/Picat/goldbachs-comet.picat
Normal file
12
Task/Goldbachs-comet/Picat/goldbachs-comet.picat
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
main =>
|
||||
println("First 100 G numbers:"),
|
||||
foreach({G,I} in zip(take([G: T in 1..300, G=g(T),G>0],100),1..100))
|
||||
printf("%2d %s",G,cond(I mod 10 == 0,"\n",""))
|
||||
end,
|
||||
nl,
|
||||
printf("G(1_000_000): %d\n", g(1_000_000)).
|
||||
|
||||
g(N) = cond((N > 2, N mod 2 == 0),
|
||||
{1 : I in 1..N // 2,
|
||||
prime(I),prime(N-I)}.len,
|
||||
0).
|
||||
Loading…
Add table
Add a link
Reference in a new issue