cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A227431 Fibonacci differences triangle, T(n,k), k<=n, where column k holds the k-th difference of A000045, read by rows.

Original entry on oeis.org

1, 1, 0, 2, 1, 1, 3, 1, 0, -1, 5, 2, 1, 1, 2, 8, 3, 1, 0, -1, -3, 13, 5, 2, 1, 1, 2, 5, 21, 8, 3, 1, 0, -1, -3, -8, 34, 13, 5, 2, 1, 1, 2, 5, 13, 55, 21, 8, 3, 1, 0, -1, -3, -8, -21, 89, 34, 13, 5, 2, 1, 1, 2, 5, 13, 34, 144, 55, 21, 8, 3, 1, 0, -1, -3, -8, -21
Offset: 1

Views

Author

Richard R. Forberg, Jul 11 2013

Keywords

Comments

Consecutive columns (i.e., k = 1, 2, 3, ...) shift the Fibonacci sequence down by 2 indices.
Diagonal (n = k) produces Fibonacci numbers at increasingly negative indices for n = k > 2. See A039834.
Row sums equal A005013(n), which equals Fibonacci A000045(n), if n is even, and equals Lucas numbers A000204(n) if n is odd.
(Rows that sum to Lucas numbers have all positive values.)

Examples

			   1
   1   0
   2   1   1
   3   1   0  -1
   5   2   1   1   2
   8   3   1   0  -1  -3
  13   5   2   1   1   2   5
  21   8   3   1   0  -1  -3  -8
  34  13   5   2   1   1   2   5  13
  55  21   8   3   1   0  -1  -3  -8 -21
  89  34  13   5   2   1   1   2   5  13  34
		

Crossrefs

Programs

  • Haskell
    a227431 n k = a227431_tabl !! (n-1) !! (k-1)
    a227431_row n = a227431_tabl !! (n-1)
    a227431_tabl = h [] 0 1 where
       h row u v = row' : h row' v (u + v) where row' = scanl (-) v row
    -- Reinhard Zumkeller, Jul 28 2013
    
  • Mathematica
    Flatten[Table[Fibonacci[Range[n, -n + 1, -2]], {n, 15}]] (* T. D. Noe, Jul 26 2013 *)
  • PARI
    T(n,k)=fibonacci(n-2*k+2) \\ Charles R Greathouse IV, Jul 30 2016

Formula

T(n,1) = F(n) for n > 0, where F(n) = A000045(n), T(n,k) = T(n,k-1) - T(n-1,k-1).