login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118683 Triangle, T(n,k) = A039701(n) + A039701(k) - A039701(n)*A039701(k), read by rows. 1

%I #11 Apr 04 2024 10:16:57

%S 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,

%T 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,

%U 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

%N Triangle, T(n,k) = A039701(n) + A039701(k) - A039701(n)*A039701(k), read by rows.

%H G. C. Greubel, <a href="/A118683/b118683.txt">Rows n = 1..50 of the triangle, flattened</a>

%e Triangle begins as:

%e 0;

%e 2, 0;

%e 0, 2, 0;

%e 1, 1, 1, 1;

%e 0, 2, 0, 1, 0;

%e 1, 1, 1, 1, 1, 1;

%e 0, 2, 0, 1, 0, 1, 0;

%e 1, 1, 1, 1, 1, 1, 1, 1;

%e 0, 2, 0, 1, 0, 1, 0, 1, 0;

%e 0, 2, 0, 1, 0, 1, 0, 1, 0, 0;

%t A039701[n_]:= Mod[Prime[n],3];

%t T[n_, k_]:= A039701[n] +A039701[k] -A039701[n]*A039701[k];

%t Table[T[n,k], {n,12}, {k,n}]//Flatten

%o (Magma)

%o A039701:= func< n | NthPrime(n) mod 3 >;

%o A118683:= func< n,k | A039701(n)+A039701(k)-A039701(n)*A039701(k) >;

%o [A118683(n,k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Apr 01 2024

%o (SageMath)

%o def A039701(n): return nth_prime(n)%3

%o def A118683(n,k): return A039701(n)+A039701(k)-A039701(n)*A039701(n)

%o flatten([[A039701(n,k) for k in range(1,n+1)] for n in range(1,13)]) # _G. C. Greubel_, Apr 01 2024

%Y Cf. A039701, A099618 (right diagonal).

%K nonn,tabl,less,easy

%O 1,2

%A _Roger L. Bagula_, May 19 2006

%E Offset corrected, definition clarified, sequence extended by Assoc. Eds. of the OEIS, Jun 15 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)