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.

A135222 Triangle A049310 + A000012 - I, read by rows.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 1, 4, 1, 1, 1, 4, 1, 5, 1, 1, 2, 1, 7, 1, 6, 1, 1, 1, 5, 1, 11, 1, 7, 1, 1, 2, 1, 11, 1, 16, 1, 8, 1, 1, 1, 6, 1, 21, 1, 22, 1, 9, 1, 1, 2, 1, 16, 1, 36, 1, 29, 1, 10, 1, 1, 1, 7, 1, 36, 1, 57, 1, 37, 1, 11, 1, 1, 2, 1, 22, 1, 71, 1, 85, 1, 46, 1, 12, 1, 1
Offset: 0

Views

Author

Gary W. Adamson, Nov 23 2007

Keywords

Comments

Row sums = A081659: (1, 2 4, 6, 9, 13, 19, 28, ...).

Examples

			First few rows of the triangle:
  1;
  1, 1;
  2, 1,  1;
  1, 3,  1,  1;
  2, 1,  4,  1,  1;
  1, 4,  1,  5,  1, 1;
  2, 1,  7,  1,  6, 1, 1;
  1, 5,  1, 11,  1, 7, 1, 1;
  2, 1, 11,  1, 16, 1, 8, 1, 1;
...
		

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember;
          if k=n then 1
        else 1 + abs( ((1+(-1)^(n-k))/2)*binomial((n+k)/2, (n-k)/2)*cos((n-k)*Pi/2) )
          fi; end:
    seq(seq(T(n, k), k=0..n), n=0..15); # G. C. Greubel, Nov 20 2019
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==n, 1, 1 + Abs[Simplify[((1+(-1)^(n-k))/2)* Binomial[(n+k)/2, (n-k)/2]*Cos[(n-k)*Pi/2]]] ]; Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 20 2019 *)
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==n): return 1
        else: return 1 + abs( ((1+(-1)^(n-k))/2)*binomial((n+k)/2, (n-k)/2)*cos((n-k)*pi/2) )
    [[T(n, k) for k in (0..n)] for n in (0..15)] # G. C. Greubel, Nov 20 2019

Formula

T(n,k) = A049310(n,k) + A000012(n,k) - Identity matrix, as infinite lower triangular matrices.
T(n,k) = 1 + abs( ((1+(-1)^(n-k))/2)*binomial((n+k)/2, (n-k)/2)*cos((n-k)*Pi/2) ), with T(n,n) = 1. - G. C. Greubel, Nov 20 2019

Extensions

More terms added and offset changed by G. C. Greubel, Nov 20 2019