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.

A242849 Triangle read by rows: T(n,k) = A060828(n)/(A060828(k) * A060828(n-k)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 3, 9, 9, 3, 9, 9, 1, 1, 1, 9, 3, 3, 9, 3, 3, 9, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 1, 9, 9, 3, 9, 9, 1
Offset: 0

Views

Author

Tom Edgar, May 23 2014

Keywords

Comments

This triangle can be obtained by replacing each entry of Pascal's Triangle by the largest power of 3 dividing that entry.
The exponent of T(n,k) is the number of 'carries' that occur when adding k and n-k in base 3 using the traditional addition algorithm.
If T(n,k) != 0 mod 3, then n dominates k in base 3.

Examples

			The triangle begins
1
1 1
1 1 1
1 3 3 1
1 1 3 1 1
1 1 1 1 1 1
1 3 3 1 3 3 1.
		

Crossrefs

Programs

  • Mathematica
    s3[n_] := 3^IntegerExponent[n!, 3];
    T[n_, k_] := s3[n]/(s3[k] s3[n-k]);
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 06 2018 *)
  • Sage
    m=50
    T=[0]+[3^valuation(i,3) for i in [1..m]]
    Table=[[prod(T[1:i+1])/(prod(T[1:j+1])*prod(T[1:i-j+1])) for j in [0..i]] for i in [0..m-1]]
    [x for sublist in Table for x in sublist]

Formula

T(n,k) = A060828(n)/(A060828(k) * A060828(n-k)).
T(n,k) = Product_{i=1..n} A038500(i)/(Product_{i=1..k} A038500(i)*Product_{i=1..n-k} A038500(i)).
T(n,k) = A038500(n)/n*(k/A038500(k)*T(n-1,k-1)+(n-k)/A038500(n-k)*T(n-1,k)).