### sum of squared Beatty sequence

Posted:

**Thu Jul 15, 2021 7:00 pm**Hello,

S(r, n)=sum(k=1 .. n) floor(r*k) is Beatty sequence.

S(sqrt(2), 10) sequence is 1, 2, 4, 5, 7, 8, 9, 11, 12, 14, and sum is 73.

I implemented this as a recursive function which has O(log n) complexity.

Is it possible to find sum of partitions where every element of sequence is

a square or another function of above elements. Square for every element gives 701.

I tried to use use n*(n + 1)*(2*n + 1)/6 instead of triangle formula, no success.

S(r, n)=sum(k=1 .. n) floor(r*k) is Beatty sequence.

S(sqrt(2), 10) sequence is 1, 2, 4, 5, 7, 8, 9, 11, 12, 14, and sum is 73.

I implemented this as a recursive function which has O(log n) complexity.

Is it possible to find sum of partitions where every element of sequence is

a square or another function of above elements. Square for every element gives 701.

I tried to use use n*(n + 1)*(2*n + 1)/6 instead of triangle formula, no success.