All pastes #462802 Raw Edit

xtknight

public text v1 · immutable
#462802 ·published 2007-04-28 15:44 UTC
rendered paste body
Using 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!)
...?