A379781 a(1)=1, a(2)=2; thereafter, a(n) is the final value at the bottom of the difference triangle of the sequence thus far.
1, 2, 1, -2, 0, 7, -14, -12, 155, -408, -364, 7693, -30940, 10712, 637701, -4224222, 9980180, 61922567, -810337234, 4100137008, -958593005, -174952472228, 1662063951016, -6944673371867, -22887336602200, 655644589917172, -5694691183524699, 19946666531550638, 176993602416669640
Offset: 1
Keywords
Examples
To find a(6), we look at the first difference triangle of the first 5 terms: 1, 2, 1, -2, 0 1, -1, -3, 2 -2, -2, 5 0, 7 7 7 is the final value, so a(6)=7.
Links
- Neal Gersh Tolunsky, Table of n, a(n) for n = 1..595
Programs
-
Mathematica
a[1] = 1; a[2] = 2; a[n_] := a[n] = Sum[(-1)^(n-k+1) * Binomial[n-2, k-1] * a[k], {k, 1, n-1}]; Table[a[n], {n, 1, 30}] (* Amiram Eldar, Jan 04 2025 *)
Comments