At the beginning F(1) =1, F(n+1) = 2·F(n) is calculated.

function F(n) {
with(Math) {
a = 1; for(i=2; i<=n; i++) {a = 2*a}
return a
}}

If I change F in the following way [F(1) = 1, F(n+1) = (F(n) + K/F(n)) / 2, K=2], I get a sequence that tends to √2.

function F(n) {
with(Math) {
a = 1; for(i=2; i<=n; i++) { a = (a+2/a)/2 }
return a
}}

If I change F in the following way [F(1)=1, F(2)=1, F(n+2) = F(n)+F(n+1)], I get the Fibonacci sequence, such that each number is the sum of the two preceding ones:

function F(n) {
with(Math) {
a = 1; b = 1; for(i=3; i<=n; i++) {A = a; a = a+b; b = A }
return a
}}

How to study  1² + 2² + 3² + ... + n² ?.

function F(n) {
with(Math) {
a = 1; for(i=2; i<=n; i++) {a = a + pow(i,2) }
return a
}}

It can be shown that 1² + 2² + 3² + ... + n² = n·(n+1)·(2n+1)/6.

How to study  F(n) = Σ k = 1 .. 2·n (−1)k·(2·k + 1) ? Is F(n) proportional to n?

function F(n) {
with(Math) {
m=2*n
a = 0; for(i=1; i<=m; i++) {a = a+pow(-1,i)*(2*i+1)}
return a
}}

F(n) = 2·n.

See also "square root" and "cube root".