A364463 Number of subsets of {1..n} with elements disjoint from first differences of elements.
1, 2, 3, 6, 10, 18, 30, 54, 92, 167, 290, 525, 935, 1704, 3082, 5664, 10386, 19249, 35701, 66702, 124855, 234969, 443174, 839254, 1592925, 3032757, 5786153, 11066413, 21204855, 40712426, 78294085, 150815154, 290922900, 561968268, 1086879052, 2104570243
Offset: 0
Keywords
Examples
The a(0) = 1 through a(5) = 18 subsets: {} {} {} {} {} {} {1} {1} {1} {1} {1} {2} {2} {2} {2} {3} {3} {3} {1,3} {4} {4} {2,3} {1,3} {5} {1,4} {1,3} {2,3} {1,4} {3,4} {1,5} {2,3,4} {2,3} {2,5} {3,4} {3,5} {4,5} {1,3,5} {2,3,4} {3,4,5} {2,3,4,5}
Crossrefs
Programs
-
Mathematica
Table[Length[Select[Subsets[Range[n]],Intersection[#,Differences[#]]=={}&]],{n,0,10}]
-
Python
from itertools import combinations def A364463(n): return sum(1 for l in range(n+1) for c in combinations(range(1,n+1),l) if set(c).isdisjoint({c[i+1]-c[i] for i in range(l-1)})) # Chai Wah Wu, Sep 26 2023
Formula
a(n) < a(n + 1) <= 2 * a(n). - David A. Corneth, Aug 02 2023
Extensions
a(21)-a(29) from David A. Corneth, Aug 02 2023
a(30)-a(32) from Chai Wah Wu, Sep 26 2023
a(33)-a(35) from Chai Wah Wu, Sep 27 2023
Comments