OFFSET
0
COMMENTS
Definition: d prime-divides n <=> d is prime and n = m*d for some m.
Equivalently: d prime-divides n iff d is prime, and the integer remainder of n divided by d is 0. (Here the 'and' is understood as an short-circuit operator.)
This definition is sufficient to define the infinite lower triangular array, i.e., if we consider only the range 0 <= d <= n. But when looking at the square array this restriction has to be made explicit because with the above definition every integer divides 0, and thus the first row of the square matrix becomes the indicator function of the primes A010051 (with an extra zero term at the start).
REFERENCES
Tom M. Apostol, Introduction to Analytic Number Theory, Springer 1976, p. 14.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..11475 (rows 0..150 of the triangle, flattened)
FORMULA
EXAMPLE
Triangle T(n, k) starts:
[0] 0;
[1] 0, 0;
[2] 0, 0, 1;
[3] 0, 0, 0, 1;
[4] 0, 0, 1, 0, 0;
[5] 0, 0, 0, 0, 0, 1;
[6] 0, 0, 1, 1, 0, 0, 0;
[7] 0, 0, 0, 0, 0, 0, 0, 1;
[8] 0, 0, 1, 0, 0, 0, 0, 0, 0;
[9] 0, 0, 0, 1, 0, 0, 0, 0, 0, 0;
.
T(0, 0) = 0, because: [0 is prime] and [0 | 0] = False and True = False.
T(6, 5) = 0, because: [5 is prime] and [5 | 6] = True and False = False.
T(6, 4) = 0, because: [4 is prime] and [4 | 6] = False and False = False.
T(6, 2) = 1, because: [2 is prime] and [2 | 6] = True and True = True.
MAPLE
divides := (k, n) -> k = n or (k > 0 and irem(n, k) = 0):
T := (n, k) -> ifelse(isprime(k) and divides(k, n), 1, 0):
for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
MATHEMATICA
A363915list[rowmax_]:=Table[Boole[PrimeQ[k]&&Divisible[n, k]], {n, 0, rowmax}, {k, 0, n}]; A363915list[20] (* Generates 21 rows *) (* Paolo Xausa, Aug 04 2023 *)
PROG
(SageMath)
matrix(ZZ, 10, 10, lambda n, k: k <= n and is_prime(k) and ZZ(k).divides(ZZ(n)))
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Jul 03 2023
STATUS
approved