what will be the formula for finding the nth term of a series in which the difference between the terms increase by 1 after every k elements
For example (for k = 3) : 1,2,3,5,7,9,12,15,18........
(k=2) : 1,2,4,6,9,12,16,20,25......
i found some formula for smaller values of k (2,3,4,5)
for k=1 : floor(((2n+1)*(2n+1))/8)
k=2 :floor(((n+1)*(n+1))/4)
i tried to look for a pattern in these formula and i found for k>2:
if k is even : floor((n+k/2)^2)/(2*k))
if k is odd : floor(n+k/2)*(n+k/2+1)/(2*k))
but these do not hold true for k>=10