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.

A106523 Diagonal sums of number triangle A106522.

Original entry on oeis.org

1, 1, 3, 4, 10, 14, 33, 49, 109, 170, 362, 586, 1207, 2011, 4037, 6878, 13536, 23464, 45475, 79891, 153011, 271612, 515460, 922372, 1738101, 3129565, 5865063, 10611336, 19802382, 35960970, 66888917, 121820229, 226016385, 412547222
Offset: 0

Views

Author

Paul Barry, May 06 2005

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,1,3,4,10]; [n le 5 select I[n] else 3*Self(n-2) + Self(n-3) -Self(n-5): n in [1..41]]; // G. C. Greubel, Aug 10 2021
    
  • Mathematica
    T[n_]:= T[n]= If[n<2, 0, If[n==2, 1, T[n-1] + T[n-2] + T[n-3]]]; (* A000073 *)
    a[n_]:= (1/11)*((-1)^n*(Fibonacci[n+2] +2*Fibonacci[n]) +10*T[n+2] +5*T[n+1] + 3*T[n]);
    Table[a[n], {n, 0, 40}] (* G. C. Greubel, Aug 10 2021 *)
  • Sage
    @CachedFunction
    def T(n):
        if (n<2): return 0
        elif (n==2): return 2
        else: return T(n-1) + T(n-2) + T(n-3)
    def a(n): return (1/11)*((-1)^n*(fibonacci(n+2) +2*fibonacci(n)) +10*T(n+2) +5*T(n+1) + 3*T(n))
    [a(n) for n in (0..40)] # G. C. Greubel, Aug 10 2021

Formula

G.f.: (1+x)/((1+x-x^2)*(1-x-x^2-x^3)).
a(n) = 3*a(n-2) + a(n-3) - a(n-5).
a(n) = Sum_{k=0..floor(n/2)} A106522(n-k, k)
a(n) = (1/11)*( 10*T(n+2) + 5*T(n+1) + 3*T(n) + (-1)^n*( F(n+1) + 3*F(n) ) ), where T(n) = A000073, and F(n) = A000045. - G. C. Greubel, Aug 10 2021