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.

A117904 Number triangle [k<=n]*0^abs(L(C(n,2)/3) - L(C(k,2)/3)) where L(j/p) is the Legendre symbol of j and p.

Original entry on oeis.org

1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1
Offset: 0

Views

Author

Paul Barry, Apr 01 2006

Keywords

Comments

Row sums are A009947(n+2).
Diagonal sums are A117905.
Inverse is A117906.
Equals A117898 mod 2.

Examples

			Triangle begins
  1;
  1, 1;
  0, 0, 1;
  1, 1, 0, 1;
  1, 1, 0, 1, 1;
  0, 0, 1, 0, 0, 1;
  1, 1, 0, 1, 1, 0, 1;
  1, 1, 0, 1, 1, 0, 1, 1;
  0, 0, 1, 0, 0, 1, 0, 0, 1;
  1, 1, 0, 1, 1, 0, 1, 1, 0, 1;
  1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1;
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= If[Abs[JacobiSymbol[Binomial[n, 2], 3] - JacobiSymbol[Binomial[k, 2], 3]]==0, 1, 0];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 20 2021 *)
  • Sage
    def A117904(n,k): return 1 if abs(jacobi_symbol(binomial(n,2), 3) - jacobi_symbol(binomial(k,2), 3))==0 else 0
    flatten([[A117904(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Oct 20 2021

Formula

G.f.: (1 +x*(1+y) +x^2*y^2 +x^3*y)/((1-x^3)*(1-x^3*y^3)).
T(n, k) = [k<=n] * 2^abs(L(C(n,2)/3) - L(C(k,2)/3)) mod 2.