OFFSET
0,3
COMMENTS
Also the minimum size of a maximal subset of {1..n} such that every pair of (not necessarily distinct) elements has a different sum.
a(n) is the minimum size of a set enumerated by A325879(n).
Number of occurrences of k: 1, 1, 3, 6, 12, 20, ...
Maximum n having a(n) = k: 0, 1, 4, 10, 22, 42, ...
There are insufficient known terms in either of the above to distinguish from other sequences.
LINKS
Thomas Bloom, Problem 156, Erdős Problems.
Erdős problems database contributors, Erdős problem database, see no. 156.
Wikipedia, Sidon sequence.
PROG
(PARI)
a(n)={
my(ismaxl(b, w)=for(k=1, n, if(!bittest(b, k) && !bitand(w, bitor(b, 1<<k)<<k), return(0))); 1);
my(recurse(k, b, w)=
if(k > n, if(ismaxl(b, w), 0, n+1),
my(s=self()(k+1, b, w));
b+=1<<k; if(!bitand(w, b<<k), s=min(s, 1+self()(k+1, b, w + (b<<k))));
s);
);
recurse(1, 0, 0);
}
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Andrew Howroyd, Mar 23 2025
STATUS
approved
