This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fibonacci_prime_indices={[ | |
3, 4, 5, 7, 11, 13, 17, 23, 29, 43, | |
47, 83, 131, 137, 359, 431, 433, 449, 509, 569, | |
571, 2971, 4723, 5387, 9311, 9677, 14431, 25561, 30757, 35999, | |
37511, 50833, 81839, 104911, 130021, 148091, 201107 | |
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
f=challenge_sequential_vertex_coloring | |
g++ -O3 -Wall -Wextra -pedantic $f.cpp -o $f | |
cpplint --filter=-legal/copyright,-build/namespaces,-runtime/references $f.cpp | |
./$f 6 planar? writeLeda 2>C6.u | |
GraphvizFiddle.py firefox <(straight_line_graphviz C6.u) | |
*/ | |
#include <boost/graph/sequential_vertex_coloring.hpp> | |
#include <boost/graph/adjacency_list.hpp> | |
#include <boost/graph/graph_utility.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <boost/graph/sequential_vertex_coloring.hpp> | |
#include <boost/graph/adjacency_list.hpp> | |
#include <boost/graph/graph_utility.hpp> | |
using namespace boost; | |
template <class graphType> | |
void | |
read_leda_graph(graphType& g, char* gname) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LEDA.GRAPH | |
int | |
int | |
22 | |
0 | |
0 | |
0 | |
0 | |
0 | |
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LEDA.GRAPH | |
int | |
int | |
14 | |
0 | |
0 | |
0 | |
0 | |
0 | |
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
#include <math.h> | |
#include "Miniball.hpp" | |
// from https://people.inf.ethz.ch/gaertner/subdir/software/miniball.html | |
/* | |
$ g++ miniball_int.cpp -O3 -o miniball_int | |
$ | |
*/ | |
int main (int argc, char* argv[]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assert(b)=if(!(b),error()); | |
SquaresRepresentations(n,k,a=0)={ | |
my(R=List(),m=sqrtint(n\k)); | |
if(k==1,return(if(m>=a&&n==m^2,[m],[]))); | |
for(b=a,m,foreach(SquaresRepresentations(n-b^2,k-1,b),s,listput(R,concat([b],s)))); | |
Vec(R); | |
} | |
signs(a)={ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{[ | |
2022202116, | |
1777034894, | |
1000032472, | |
399866798, | |
314187728, | |
271643232, | |
232050760, | |
231583998, | |
231295516, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
F__={[\\ needs parisizemax >= 600M; from http://www.prothsearch.com/fermat.html | |
[3], \\ F0 | |
[5], | |
[17], | |
[257], | |
[65537], | |
[641, 6700417], | |
[274177, 67280421310721], | |
[59649589127497217, 5704689200685129054721], | |
[1238926361552897, "P62"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{[ | |
"10^2000007-10^1127194-10^872812-1", | |
"10^2000005-10^1051046-10^948958-1", | |
"10^1888529-10^944264-1", | |
"10^1234567-20342924302*10^617278-1", | |
"10^1234567-1927633367291*10^617277-1", | |
"10^1234567-3626840486263*10^617277-1", | |
"10^1234567-4708229228074*10^617277-1", | |
"10^490000+3*(10^7383-1)/9*10^241309+1", | |
"10^474500+999*10^237249+1", |