OFFSET
1,2
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 1..270 (terms n = 1..165 from Robert Israel)
Fausto A. C. Cariboni, Sets of maximal span that yield a(n) for n = 2..270, Nov 18 2018.
MAPLE
f:= proc(n) uses GraphTheory; IndependenceNumber(Graph(n,
{seq(seq({i, i+x^2}, x=2..floor(sqrt(n-i))), i=1..n)}));
end proc:
map(f, [$1..58]); # Robert Israel, Mar 20 2017
PROG
(MATLAB with CPLEX)
function [v, X] = A131754(n)
A = sparse(0, n);
rownum = 0;
for i =1:n
for x =2:floor(sqrt(n-i))
rownum = rownum+1;
A(rownum, [i, i+x^2]) = 1;
end
end
prob.f = -ones(n, 1);
prob.Aineq = A;
prob.bineq = ones(rownum, 1);
prob.ctype = char(ones(1, n)*'B');
cplex = Cplex(prob);
cplex.DisplayFunc = [];
cplex.solve();
if cplex.Solution.status == 101
v = -cplex.Solution.objval;
x = cplex.Solution.x;
X = find(x > 0.5);
end
end
CROSSREFS
KEYWORD
nonn
AUTHOR
Olivier Gérard, Sep 17 2007
EXTENSIONS
More terms from Robert Israel, Mar 20 2017
STATUS
approved