login
A117908
Chequered (or checkered) triangle for odd prime p=3.
3
1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,1
COMMENTS
Row sums are A117909.
Diagonal sums are A117910.
For odd prime p, T(n,k;p) = [k<=n]*0^abs(L(C(n,p-1)/p) - 2*L(C(k,p-1)/p)) defines a checkered triangle for p.
FORMULA
G.f.: (1 +x*(1+y) +x^3*y)/((1-x^3)*(1-x^3*y^3)).
T(n,k) = [k<=n] * 0^abs(L(C(n,2)/3) - 2*L(C(k,2)/3)) where L(j/p) is the Legendre symbol of j and p.
T(n, k) = 1 if (n mod 3) < 2 and (k mod 3) < 2, otherwise 0. - Kevin Ryde, Oct 21 2021
EXAMPLE
Triangle begins
1;
1, 1;
0, 0, 0;
1, 1, 0, 1;
1, 1, 0, 1, 1;
0, 0, 0, 0, 0, 0;
1, 1, 0, 1, 1, 0, 1;
1, 1, 0, 1, 1, 0, 1, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 1, 0, 1, 1, 0, 1, 1, 0, 1;
1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
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;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
MATHEMATICA
T[n_, k_]:= If[Abs[JacobiSymbol[Binomial[n, 2], 3] - 2*JacobiSymbol[Binomial[k, 2], 3]]==0, 1, 0];
Table[T[n, k], {n, 0, 15}, {k, 0, n}]//Flatten (* G. C. Greubel, Oct 21 2021 *)
PROG
(Sage)
def A117908(n, k): return 1 if (n%3<2 and k%3<2) else 0
flatten([[A117908(n, k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Oct 21 2021
(Magma)
A117908:= func< n, k | (n mod 3) lt 2 and (k mod 3) lt 2 select 1 else 0>;
[A117908(n, k): k in [0..n], n in [0..15]]; // G. C. Greubel, Nov 18 2021
CROSSREFS
KEYWORD
easy,nonn,tabl
AUTHOR
Paul Barry, Apr 01 2006
STATUS
approved