OFFSET
1,4
COMMENTS
The partial arithmetic density D_n(A) up to n is merely the number of arithmetic progressions, A(s(n)), divided by the total number of nonempty subsets of {s(1), s(2), ..., s(n)}, i.e., A(s(n))/(2^n - 1). As n approaches infinity, D_n(A) converges to zero. Furthermore, the infinite sum of the partial densities for any sequence always converges to the total density D(A). Every infinite arithmetic progression has the same total density, Sum_{n >= 1} a(n)/(2^n - 1) = alpha ~ 1.25568880818612911696845537; sequences with a finite number of progressions have D(A) < alpha; and sequences without any arithmetic progressions have D(A) = 0.
LINKS
Encyclopedia of Mathematics, Density of a sequence
Eric Weisstein's World of Mathematics, Arithmetic Progression
FORMULA
a(n) = Sum_{i=1..n} Sum_{j=1..i} floor((i - 1)/(j + 1)).
PROG
(PARI) a(n) = sum(i=1, n, sum(j=1, i, floor((i - 1)/(j + 1))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph Wheat, Dec 21 2019
STATUS
approved