login
A118683
Triangle, T(n,k) = A039701(n) + A039701(k) - A039701(n)*A039701(k), read by rows.
1
0, 2, 0, 0, 2, 0, 1, 1, 1, 1, 0, 2, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 0, 2, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
1,2
EXAMPLE
Triangle begins as:
0;
2, 0;
0, 2, 0;
1, 1, 1, 1;
0, 2, 0, 1, 0;
1, 1, 1, 1, 1, 1;
0, 2, 0, 1, 0, 1, 0;
1, 1, 1, 1, 1, 1, 1, 1;
0, 2, 0, 1, 0, 1, 0, 1, 0;
0, 2, 0, 1, 0, 1, 0, 1, 0, 0;
MATHEMATICA
A039701[n_]:= Mod[Prime[n], 3];
T[n_, k_]:= A039701[n] +A039701[k] -A039701[n]*A039701[k];
Table[T[n, k], {n, 12}, {k, n}]//Flatten
PROG
(Magma)
A039701:= func< n | NthPrime(n) mod 3 >;
A118683:= func< n, k | A039701(n)+A039701(k)-A039701(n)*A039701(k) >;
[A118683(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 01 2024
(SageMath)
def A039701(n): return nth_prime(n)%3
def A118683(n, k): return A039701(n)+A039701(k)-A039701(n)*A039701(n)
flatten([[A039701(n, k) for k in range(1, n+1)] for n in range(1, 13)]) # G. C. Greubel, Apr 01 2024
CROSSREFS
Cf. A039701, A099618 (right diagonal).
Sequence in context: A219491 A305714 A324730 * A175800 A344981 A161116
KEYWORD
nonn,tabl,less,easy
AUTHOR
Roger L. Bagula, May 19 2006
EXTENSIONS
Offset corrected, definition clarified, sequence extended by Assoc. Eds. of the OEIS, Jun 15 2010
STATUS
approved