%I #20 Nov 14 2018 13:58:30
%S 0,0,1,0,1,1,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,1,1,0,1,0,1,0,0,0,0,0,0,
%T 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,1,0,0,0,1
%N Triangle read by rows, T(n,k) = 1 if both n and k are prime, 0 otherwise; 1 <= k <= n.
%C Row sums = the prime count, A049084: (0, 1, 2, 0, 3, 0, 4, 0, 0, 0, 5, ...).
%H Muniru A Asiru, <a href="/A143541/b143541.txt">Table of n, a(n) for n = 1..1275</a>(rows n=1..50)
%F Triangle read by rows, T(n,k) = 1 if n & k are prime, 0 otherwise.
%F The n-th row = n zeros if n is a nonprime; first n terms of A010051 (the characteristic function of primes) if n is prime.
%e First few rows of the triangle are:
%e 0;
%e 0, 1;
%e 0, 1, 1;
%e 0, 0, 0, 0;
%e 0, 1, 1, 0, 1;
%e 0, 0, 0, 0, 0, 0;
%e 0, 1, 1, 0, 1, 0, 1;
%e ...
%e Row 5 = first 5 terms of A010051: (0, 1, 1, 0, 1).
%e T(5,3) = 1 since (5,3) are prime; but T(5,4) = 0 since 4 is a nonprime.
%p T:=(n,k)->`if`(isprime(n) and isprime(k),1,0): seq(seq(T(n,k),k=1..n),n=1..12); # _Muniru A Asiru_, Oct 28 2018
%t nn = 11; Flatten[Table[Table[If[And[PrimeQ[n], PrimeQ[k]], 1, 0], {k, 1, n}], {n, 1, nn}]] (* _Mats Granvik_, Oct 28 2018 *)
%Y Cf. A010051, A049084.
%K nonn,tabl
%O 1,1
%A _Gary W. Adamson_, Aug 23 2008
|