A100480 a(1)=1 and, for n>1, a(n) is the smallest positive integer such that the subset S(c) of {1,2,3,...,n} defined by S(c)={k|1<=k<=n; a(k)=c} does not contain a 3-term arithmetic progression for any integer c.
1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 5, 4, 4, 5, 1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 5, 4, 4, 5, 2, 3, 3, 4, 4, 5, 4, 4, 5, 5, 6, 6, 5, 6, 6, 7, 7, 8, 5, 6, 6, 5, 6, 6, 7, 7, 8, 1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 5
Offset: 1
Keywords
Links
- Samuel B. Reid, Table of n, a(n) for n = 1..10000
- Samuel B. Reid, Python program for A100480
Programs
-
Python
# See Links section.
Formula
a(n + 1) = A006997(n) + 1 for any n >= 0. - Rémy Sigrist, Jun 28 2022
Comments