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.

A143656 Triangle T(n, k) = A045545(k) if gcd(n,k) = 1, 0 otherwise, read by rows.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 0, 2, 0, 1, 1, 2, 3, 0, 1, 0, 0, 0, 7, 0, 1, 1, 2, 3, 7, 8, 0, 1, 0, 2, 0, 7, 0, 22, 0, 1, 1, 0, 3, 7, 0, 22, 32, 0, 1, 0, 2, 0, 0, 0, 22, 0, 66, 0, 1, 1, 2, 3, 7, 8, 22, 32, 66, 91, 0, 1, 0, 0, 0, 7, 0, 22, 0, 0, 0, 233, 0, 1, 1, 2, 3, 7, 8, 22, 32, 66, 91, 233, 263, 0
Offset: 1

Views

Author

Gary W. Adamson, Aug 28 2008

Keywords

Comments

Sum of row terms = A045545 starting with offset 1: (1, 1, 2, 3, 7, 8, 22,...).
A045545 also = rightmost diagonal with nonzero terms.
Sum of n-th row terms = rightmost nonzero term of next row.
Prime n rows = first (n-1) terms of (1, 1, 2, 3, 7, 8,...) followed by 0.
Asymptotic limit of A054521^n * A143656 = A045545 as a vector.

Examples

			First few rows of the triangle =
  1;
  1, 0;
  1, 1, 0;
  1, 0, 2, 0;
  1, 1, 2, 3, 0;
  1, 0, 0, 0, 7, 0;
  1, 1, 2, 3, 7, 8,  0;
  1, 0, 2, 0, 7, 0, 22,  0;
  1, 1, 0, 3, 7, 0, 22, 32,  0;
  1, 0, 2, 0, 0, 0, 22,  0, 66, 0;
  ...
		

Crossrefs

Programs

  • Maple
    A045545:= n->`if`(n<3, 1, add(`if`(gcd(n,j)=1, A045545(j), 0), j=1..n-1) );
    T:= (n,k) -> `if`(gcd(n,k)=1, A045545(k), 0);
    seq(seq(T(n,k), k=1..n), n=1..12); # G. C. Greubel, Mar 08 2021
  • Mathematica
    A045545[n_]:= A045545[n]= If[n<3, 1, Sum[Boole[GCD[n, k]==1] A045545[k], {k,n-1}]];
    T[n_, k_]:= If[GCD[n, k]==1, A045545[k], 0];
    Table[T[n, k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Mar 08 2021 *)
  • Sage
    @CachedFunction
    def A045545(n): return 1 if n<3 else sum( kronecker_delta(gcd(n, j), 1)*A045545(j) for j in (0..n-1) )
    def T(n,k): return A045545(k) if gcd(n,k)==1 else 0
    flatten([[T(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Mar 08 2021

Formula

Triangle read by rows, A054521 * (A045545 * 0^(n-k)); 1<=k<=n.
T(n,k) = A045545(k) if gcd(n,k) = 1, 0 otherwise, where A045545 = (1, 1, 2, 3, 7, 8, 22, 32, 66,...) starting with offset 1.