A325879 Number of maximal subsets of {1..n} such that every ordered pair of distinct elements has a different difference.
1, 1, 1, 3, 3, 6, 14, 20, 24, 36, 64, 110, 176, 238, 294, 370, 504, 736, 1086, 1592, 2240, 2982, 3788, 4700, 5814, 7322, 9396, 12336, 16552, 22192, 29310, 38046, 48368, 60078, 73722, 89416, 108208, 131310, 160624, 198002, 247408, 310410, 390924, 490818, 613344, 758518
Offset: 0
Keywords
Examples
The a(0) = 1 through a(7) = 20 subsets: {} {1} {1,2} {1,2} {2,3} {1,2,4} {1,2,4} {1,2,4} {1,3} {1,2,4} {1,2,5} {1,2,5} {1,2,6} {2,3} {1,3,4} {1,3,4} {1,2,6} {1,3,4} {1,4,5} {1,3,4} {1,4,5} {2,3,5} {1,3,6} {1,4,6} {2,4,5} {1,4,5} {1,5,6} {1,4,6} {2,3,5} {1,5,6} {2,3,6} {2,3,5} {2,3,7} {2,3,6} {2,4,5} {2,4,5} {2,4,7} {2,5,6} {2,5,6} {3,4,6} {2,6,7} {3,5,6} {3,4,6} {3,4,7} {3,5,6} {4,5,7} {4,6,7} {1,2,5,7} {1,3,6,7}
Links
- Fausto A. C. Cariboni, Table of n, a(n) for n = 0..100
- Wikipedia, Sidon sequence.
- Index entries for sequences related to Golomb rulers.
Crossrefs
Programs
-
Mathematica
fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)]; Table[Length[fasmax[Select[Subsets[Range[n]],UnsameQ@@Subtract@@@Subsets[Union[#],{2}]&]]],{n,0,10}]
-
PARI
a(n)={ my(ismaxl(b,w)=for(k=1, n, if(!bittest(b,k) && !bitand(w,bitor(b,1<
n, ismaxl(b,w), my(s=self()(k+1, b,w)); b+=1< Andrew Howroyd, Mar 27 2025
Extensions
a(21)-a(45) from Fausto A. C. Cariboni, Feb 08 2022
Comments