login
A209438
Table of a(d,n) where a(d,n) gives the number of subsets of length n that do not contain an arithmetic progression of length 3 with distance d.
4
1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 7, 4, 2, 1, 1, 13, 8, 4, 2, 1, 1, 24, 16, 8, 4, 2, 1, 1, 44, 28, 16, 8, 4, 2, 1, 1, 81, 49, 32, 16, 8, 4, 2, 1, 1, 149, 91, 64, 32, 16, 8, 4, 2, 1, 1, 274, 169, 112, 64, 32, 16, 8, 4, 2, 1, 1, 504, 312, 196, 128, 64, 32, 16
OFFSET
0,5
COMMENTS
First row just gives the tribonacci numbers.
n offset is 0 but d offset is 1 so 1st entry is a(1,0).
FORMULA
a(d,n) = Product_{i=0 to d-1} T(floor(n + i)/d) + 2) where T is the n-th tribonacci number.
EXAMPLE
1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, ...
1, 2, 4, 8, 16, 28, 49, 91, 169, 312, 576, ...
1, 2, 4, 8, 16, 32, 64, 112, 196, 343, 637, ...
1, 2, 4, 8, 16, 32, 64, 128, 256, 448, 784, ...
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, ...
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, ...
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, ...
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, ...
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, ...
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, ...
................................................
For a(2,5) we count subsets of {1,...,5} that do not contain {1,3,5}, the only d=2 AP possible here. There are 4 subsets containing {1,3,5} so a(2,5) = 2^5-4 = 28.
MATHEMATICA
T[0] = 0; T[1] = 1; T[2] = 1; T[n_] := T[n - 1] + T[n - 2] + T[n - 3]; a[d_, n_] := Product[T[Floor[(n + i)/d] + 2], {i, 0, d - 1}]; Flatten[Table[a[j, i - j], {i, 0, 10}, {j, 0, i}]]
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
David Nacin, Mar 09 2012
STATUS
approved