A330285 The maximum number of arithmetic progressions in a sequence of length n.
0, 0, 1, 3, 7, 12, 20, 29, 41, 55, 72, 90, 113, 137, 164, 194, 228, 263, 303, 344, 390, 439, 491, 544, 604, 666, 731, 799, 872, 946, 1027, 1109, 1196, 1286, 1379, 1475, 1579, 1684, 1792, 1903, 2021, 2140, 2266, 2393, 2525, 2662, 2802, 2943, 3093, 3245, 3402, 3562, 3727
Offset: 1
Keywords
Links
- Encyclopedia of Mathematics, Density of a sequence
- Eric Weisstein's World of Mathematics, Arithmetic Progression
Programs
-
PARI
a(n) = sum(i=1, n, sum(j=1, i, floor((i - 1)/(j + 1))))
Formula
a(n) = Sum_{i=1..n} Sum_{j=1..i} floor((i - 1)/(j + 1)).
Comments