xtknight
public text v1 · immutableUsing f(n) = a + b*n + c*n*(n-1)/2 + d*n*(n-1)*(n-2)/3! + ...
cubic function, triangle of differences.
1 3 7 15 29 51 n = 1
2 4 8 14 22 n = 2
2 4 6 8 n = 3
2 2 2 n = 4 <----------
0 0 n = 5. All zero differences here. it's a (n-1)th=(3rd order) function!
f(n) = 1 + 2*n + (2*n*(n-1)/2) + (2*n*(n-1)*(n-2)/3!) + (2*n*(n-1)*(n-2)*(n-3)/4!)
...?